- Home /
How to auto rotate a object, during it moving in a path.
I'm new in Unity Engine. I need to rotate a object when it's moving in a path, however, its movement don't use any keyboard or mouse (like a bot or player enemy). This object is a vehicle and need to do the curve automaticly.
Have a method to do this?
Obs.: My game is Isometric, and i use sprites (none 3d object).
Your game is 2D? So I assume you have the sprites for the rotations you need ... how many degrees of isometric rotation are you trying to support, 360? How many rotational steps?
Four rotational steps and it has to rotate from ninety to ninety degrees to the diagonal positions. so i imagine it can be done.
For example: -45º (45º) to +45º (315º)
Answer by YetAnotherKen · Sep 07, 2019 at 02:21 AM
does this help: https://docs.unity3d.com/Manual/SpriteEditor.html
The problem is my object dont rotate at the correct time. i have the sprites, but i as unsucessfully tried make it rotate (in isometric angles ). i have tried looktAt() / quaternion / rotate / rotateTowards.... but nothing with success. it only make the object rotate 360º as an ball hahah