How do I orientate a spiteís motion to device tilt

Get help using Construct 2

Post » Thu Jun 06, 2013 10:00 am

Hello,

First off Iím pretty new to Construct, so if Iím making any newbie mistakes in how Iím going about trying to accomplish my goal please donít judge too harshly.

That said Iím currently trying to get a sprite (with bullet motion) to orientate its angle of motion toward a mobile deviceís left-right tilt. Currently I set the angle of motion of the ďplayerĒ sprite toward Touch.Gamma degrees every tick (see the attached project file). The result of this is the sprite changing direction almost randomly when I tilt my device.

What Iíd like to be able to do is always have the ďplayerĒ sprite moving toward the top of the device but have its motion veer to the left when the user tilts the device to the left and to the right when the device is tilted to the right.

Thanks for your help :D

https://dl.dropboxusercontent.com/u/43068486/HowOrientateASpiteMotionDeviceTilt.capx
B
1
Posts: 1
Reputation: 127

Post » Thu Jun 06, 2013 7:09 pm

did u use the touch object it gives the rotation of the device
B
40
S
11
G
7
Posts: 514
Reputation: 9,646


Return to How do I....?

Who is online

Users browsing this forum: ditocruz, mcscooter and 24 guests