- Home /
Why is my rocket instantiated at the wrong angle?
I am working on an FPS for which we have been provided with a rocket launcher and rocket texture.
The rocket launcher instantiates the rocket from the right place and in the right direction, but the rocket is 90 degrees out - the rocket is fired straight out of the gun but the tip of the rocket points to the floor and not to the direction in which the rocket travels.
Any help would be greatly appreciated. Thanks Will
Could you just confirm what z-forward is? I think this might be it, thanks.
z forward means that Z is forward.
you make a model of a car. the Z axis must be forward for the car. you make a model of a face. the z axis must be the way the face is looking. you make a model of a cow. the z axis must be the direction the cow walks forward
Okay I am certain that if I can solve this issue regarding Z forward, I will have also solved 3 of my other issues as well (meaning 3 less posts on Unity Answers!!)
So basically the problem is that I need to rotate the rocket so that its tip lies along the z axis
So what I do is open 3DS max, rotate the rocket so that its tip is along the Z axis, and then export the rocket as an fbx.
Then I import it into Unity and the axes are still wrong!!!
So my question is how can I get it so that the axes actually change in 3DS max??? Or how do I solve my above issue?
If anyone can answer this I will be a happy man!
Answer by TheDarkVoid · Oct 06, 2012 at 11:44 PM
Your `Instantiate()` function may look somethign like this: `Instantiate(someGameObject, someTransform.position, Quaternion.identity);`
all you need to do is this:
`Instantiate(someGameObject, someTransform.position, someTransform.rotation);`
someTransform is that spawn point you have and someGameObject is your rocket.