Quantcast
Channel: Questions in topic: "error"
Viewing all articles
Browse latest Browse all 7934

Problem Instantiating a Prefab

$
0
0
I have a prefab plane, with an attached material, and I instantiate that prefab in the game, but when i set the quaternion, the objects rotation does not seem to be the quaternion that I set in the instantiation of the object. I set the quaternion to (40.0f, -180.0f, 0.0f, 0.0f) but when I start the game, the planes rotation is always way off. I am a beginner using Unity, and so maybe I am doing this all wrong, but is the rotation of an object a quaternion? Why is the rotation of the object then only use x, y, and z values, but a quaternion has x, y, z, and w?

Viewing all articles
Browse latest Browse all 7934

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>