Mobile Tilt Movement

Get help using Construct 2

Post » Sun Aug 24, 2014 1:24 pm

Hello

I found the following example for mobile movement:

Image

Image

When I move my phone left/right my object starts moving left/right in the given speed. But how is it possible to move my object at a lower speed when i move my phone just a bit left/right, and a faster speed when I move my phone in a bigger angle. It also should stop moving when I tilt my phone back. Actually I need the same movement like it was used in "Doodle Jump". Any suggestions?

Thanks in advance.
B
3
Posts: 1
Reputation: 179

Post » Sun Aug 24, 2014 5:24 pm

The orientation is in degrees, so you should set speed according to the degrees..

While using 8direction behaviour you could for instance set the speed to (touch.beta/90)*sprite.8direction.maxspeed
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775


Return to How do I....?

Who is online

Users browsing this forum: max2612 and 8 guests