Moving to the right of the object has a bug

Animation Examples | Babylon.js Playground (babylonjs.com)
Please take a look at my example

I have two boxes, one of which rotates 180 degrees.

I animated them to move towards their right side, but why did they move in the same direction? My box2 has been rotated 180 degrees. When the animation is played correctly, shouldn’t the distance between them get farther and farther?

You have to update world matrix after rotation is changed and before using right-direction, else the right direction is not up to date.

5 Likes