Quantcast
Channel: Questions in topic: "rotating"
Viewing all articles
Browse latest Browse all 173

How to only slerp Y and Z, whilst independently rotating X

$
0
0
Hello I'm using `Quaternion transformRotation = Quaternion.Slerp (transform.rotation, Quaternion.LookRotation (movement.normalized), 0.6f); transform.rotation = transformRotation;` To rotate my character in the direction they're moving. However, when jumping, I'm also applying `transform.Rotate (new Vector3 (50, 0, 0));` To give tha appearance of a somersault. (Keeps rotating until landing). The trouble is when using them both together (when moving whilst jumping) it only appears to rotate forwards slightly. I've searched these forums and tried to implement the supposed fixes but they didn't work for me. Any ideas?

Viewing all articles
Browse latest Browse all 173

Trending Articles



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