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.
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.
Posts: 1,440
Reputation: 47,805

Return to How do I....?

Who is online

Users browsing this forum: ELFIN and 6 guests