- Home /
Question by
Oliversgame · Nov 01, 2018 at 09:55 AM ·
rotationtransformquaternionrotate
Rotate object to where aiming
I have a rocket launcher. I can shoot around everywhere in 360°. (i use Instantiate and rocketprefabs) But my rockets is always facing just one way. Its look pretty wierd when i shooting downwards and my rocket faceing up. How can i set that where to i aiming the rockets will rotate that way.
Comment
Answer by CDAXRC · Nov 01, 2018 at 11:08 AM
Instantiate(prefab, new Vector3(i * 2.0F, 0, 0), Quaternion.identity); //You forgot about setting rotation.
Your answer
Follow this Question
Related Questions
How to instantiate on custom rotation? 1 Answer
Player character X rotation going haywire on game start 1 Answer
Rotation not working 3 Answers
How i can equal 2 Tranform Rotations? 1 Answer
Rotation Jumping values (0 to 180) 1 Answer