shooting direction 3D

zmichaelbigz 3 years ago updated by Daz 3 years ago 3

I am trying to make a jet shoot a missile in the direction the player is facing but I cant figure it out any help would be appreciated. This only shoots in original Z position

Bolt Version:
Unity Version:
Scripting Backend:
.NET Version (API Compatibility Level):
The way I created my projectiles was to create an empty unity GameObject called SpawnPoint in the position I want the projectile to spawn. 
Create a Bolt variable of type Game Object to allow me to reference it in the graph.
Used Get Position and Rotation of this spawn point to Instantiate the projectile in that location.

I put the force of the projectile onto the projectile object itself so it moves when it appears.
I used a Vector3 variable to set its force and direction.

I don't know if there's a better way but this worked for me.

There is always more than one way ;-)
At the end it depends on your use case what works better. 

Now something totally different.
I saw you have a Gameplay seconds and Gameplay minutes int variable.
There is a fantastic function called timespan which you can use for all time related formats. But you have to add it to you Types.

Ah that's useful thanks, I'll have a look at that.