Compensate for sprite's speed when applying force?

Get help using Construct 2

Post » Sat Jan 28, 2012 9:51 pm

I have a sprite with Platform behavior, which has to throw grenades at the cursor whenever the player presses the mouse button. I made the grenade's movement by using
[code]Apply Physics force 30 toward (Mouse.X, Mouse.Y) at image point 0[/code]
Thing is, this only works well if the Sprite is not moving. When it's walking around, he moves faster than the grenade, which makes it too hard to aim...
B
2
G
2
Posts: 16
Reputation: 682

Post » Sun Jan 29, 2012 2:46 am

I would try something like

Apply Physics force 30 + Sprite.speed toward (Mouse.X, Mouse.Y) at image point 0

But I don't know if it would work...
B
192
S
6
G
7
Posts: 213
Reputation: 10,178


Return to How do I....?

Who is online

Users browsing this forum: R0J0hound, Radulepy, Yahoo [Bot] and 6 guests