(3D) Moving an object in the direction in which it is pointing

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By AcoAlex

I want to add bullets to my game that are Area3D’s and move straight ahead in the direction they are facing. How can I achieve this?

:bust_in_silhouette: Reply From: Der_tolle_Dude

You can use this line of code in the physics process function of your bullet:

global_transform.origin -= transform.basis.z.normalized() * bullet_speed * delta