0 votes

when the missile launching of the cannon so I needed flew directly without regard to the ship's speed...How do we do that?...Thanks to everyone for help.
enter image description here
enter image description here
enter image description here

in Engine by (454 points)

1 Answer

+1 vote
Best answer

Missiles use to go faster than the ship/plane that shoots them (they need to hit something similar), so, minimum speed should be > than (normal) max speed of ships/planes (that is a design thing).

Some real missiles are dropped and a little time passes before the propulsor starts, starting speed is the same as the plane that dropped them (minus air resistance and other variables).

So options, depending on the design, could be high acceleration with initial speed = ship current speed (more simulation type).
Or fixed speed > max ship speed (arcade shooter type).

Since you use rigid bodies...

If accelerated, set initial velocity = ship velocity and then apply impulses but play with damp or stop when reach max speed or will keep accelerating.

If going for fixed high speed, control damp (zero) and just set initial velocity on ready and forget about the missile.

Always set gravity scale to something close to zero (or zero) until you need it.

Linear velocity, linear damp, gravity scale, are all properties of rigid bodies.

by (7,922 points)
selected by

Thanks so much for a rapid and very useful response, now it's all a clearer.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.