Quantcast
Channel: Questions in topic: "quaternion.slerp"
Viewing all articles
Browse latest Browse all 133

How to Quaternion Slerp back to Original Position but Keep Current Heading?

$
0
0
Hi guys, I'm using this code: transform.rotation = Quaternion.Slerp(transform.rotation, originalRotationValue, Time.time * rotationResetSpeed); which works great. However, originalRotationValue returns back to 0, which makes sense as in Start() we have: originalRotationValue = transform.rotation; The problem is I need to keep the originalRotationValue.y where it's currently at. Not rotate back to 0. Can you please help? Thanks!

Viewing all articles
Browse latest Browse all 133

Trending Articles



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