Quantcast
Viewing latest article 13
Browse Latest Browse All 56

Character stand straight

I've implemented a spell casting system where my character always faces where he is casting. This some times makes his y rotation change when he's casting upwards (flying enemy etc). I would like to reset his rotation to "stand straight" on the ground when I start moving again. I've tried this: transform.rotation = Quaternion.FromToRotation(transform.up, Vector3.up); Believing this would make his current rotation align with the top of the world. Why is this not working and what would be the correct way to do this?

Viewing latest article 13
Browse Latest Browse All 56

Trending Articles



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