How I can set correct direction of avatar?

I’m working on a little script that will load some random avatars and fill the square. I’ve chosen 5 random avatars to walk inside the square at 10 second intervals.
The problem is that I wish to change the avatar’s correct direction, which is traveling in opposite directions.
I chose code from this playground.

For the avatars that are facing the wrong direction, you should do mesh.rotate.y += Math.PI;

3 Likes