Quantcast
Viewing all articles
Browse latest Browse all 133

Quaternion.Slerp is not working as Quaternion.Euler has weird values

I just want a simple Rotation in the Y Axis with random values and have following code: private void Rotate() { rotation = Random.Range(-360.0f, 360.0f); print(rotation); Quaternion qRotation = Quaternion.Euler(0, rotation, 0); print(qRotation); transform.rotation = Quaternion.Slerp(transform.rotation, qRotation, Time.deltaTime * rotationSpeed); } But on Runtime the rotation is not working and the values for the Quaternion is also weird... ![alt text][1] [1]: /storage/temp/146491-debug.jpg Even when i put fix flaots into the Quaternion.Euler, the rotation is not happening as the values for the qRotation will alway between 0 and 1...

Viewing all articles
Browse latest Browse all 133

Trending Articles



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