Smooth Rotation Quaternion - Pathfinding Update

Hello,

if somebody used the quaternion rotation variant I proposed on lesson “Unit Rotate when Moving”, original post below, will have to write a different code in the Update method in MoveAction.cs

I improved a little the rotation by making a check that showed a console info message if there was 0 rotation, just to don’t see the message :slight_smile:
With this code the pathfinding will work exactly as in this lesson and it will keep the smooth rotation.

1 Like

Oh yup nice catch, if you use some logic to place the unit perfectly on the target position when it gets there (like MoveTowards) then yup it will get to a point where rotation is 0 and fires that message.

2 Likes

Privacy & Terms