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

Get help using Construct 2

Post » Thu Jun 06, 2013 10:00 am


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
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
Posts: 514
Reputation: 10,271

Return to How do I....?

Who is online

Users browsing this forum: DangerGames and 18 guests