Projectile Drifts When Launched From Speeding Object

Get help using Construct 2

Post » Fri May 20, 2016 8:50 am

Hello and thanks for looking :)

I have a car that shoots a missile at other cars. The problem Im having is the missile drifts off course the more I speed up the car. E.g. When stopped and pointing at a 45 degree angle the missile does what it's supposed to - it moves at an angle of 45 degrees. If driving slowly it still behaves properly but when the car is travelling at high speed the missile drifts the faster the car moves.
Is there anyway to mitigate this?

Im spawning the missile with bullet behavior as such (the animation allows for 24 frames at 15 degrees each);

set bullet angle of motion to angle -->((((carBlock.AnimationFrame*15)+360)%360)/15)*(15)

Thanks for your time.
B
25
S
7
Posts: 79
Reputation: 2,267

Post » Fri May 20, 2016 9:24 am

i presume your bullet speed is autoupdated on everytick based on car movement thats why it accelerates as the car... try setting the bullet speed relative to the car movement only on spawning of the bullet or rocket what ever it is. that should fix it.
B
70
S
20
G
67
Posts: 1,316
Reputation: 42,305


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 8 guests