Hi experts,
i am testing the simple onTiltevent that is similar to the one on the sample “shape Tumber” with simple circles.
i am using the follwoing funciton :
[lua]
function onTilt( event )
physics.setGravity( ( 9.8 * event.xGravity ), ( -9.8 *event.yGravity ) )
end
Runtime:addEventListener( “accelerometer”, onTilt )
[/lua]
The function works as expected when using the following build settings (portrait) :
[lua]
– cpmgen build.settings
settings =
{
orientation =
{
default =“portrait”,
supported =
{
“portrait”
},
},
}
[/lua]
but when i use landscapeRight as shown below i got strange behavior :
[lua]
settings =
{
orientation =
{
default =“landscapeRight”,
content = “landscapeRight”,
supported =
{
“landscapeRight”
},
},
}
[/lua]
do I need to correct something in my code ?
Regards
Abdul