Launching missiles from the flying space ship? [3D]

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Bishop
:warning: Old Version Published before Godot 3 was released.

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.


:bust_in_silhouette: Reply From: eons

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.

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

Bishop | 2016-12-30 19:04