Quantcast
Viewing all articles
Browse latest Browse all 94

Override animation in LateUpdate()

Hi, I want to make a Mech's head look at the player, the Mech is animated so to use .. transform.LookAt (_player.transform.position); in LateUpdate() works fine but I want to slowly rotate it to it's position but using .. transform.rotation = Quaternion.Slerp(transform.rotation, (Quaternion.LookRotation(transform.position - _player.transform.position)), Time.deltaTime * _rotationTime); does not work in LateUpdate() .. Is there a way to override the animation slowly rotating? Thanks.

Viewing all articles
Browse latest Browse all 94

Trending Articles



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