How do I give a physics object velocity on touch end?

Get help using Construct 2

Post » Tue Jan 20, 2015 8:30 pm

I have a player that moves around a circle. When I touch the screen I build up power. On release I give the player a velocity equal to the power and move in the direction of the touch x and y.

On a short touch it's fine, but on a long touch the player receives no velocity at all.

Capx attached (Game layout)

Any ideas?
You do not have the required permissions to view the files attached to this post.
ImageImageImageImageImage
B
19
S
5
G
1
Posts: 614
Reputation: 2,542

Post » Tue Jan 20, 2015 9:25 pm

It looks like it's a problem switching between running around the circle and setting the velocity. If I put a 0.04 second wait between setting landed to 0 and adding the velocity, it seems fine. However, adding a wait feels sloppy and it may break depending on the performance of the device.
ImageImageImageImageImage
B
19
S
5
G
1
Posts: 614
Reputation: 2,542


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 8 guests