Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Unity 2020 LTS & Unity 2021.1 have been released.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Rotating object then back to original position

Discussion in 'Visual Scripting' started by Arzie101, Apr 7, 2021.

  1. Arzie101


    Feb 17, 2021
    Hello all, I'm making a game using a joystick, i'm working on that if it the player is idle, and it shoots somewhere else the player rotates towards it and back. What I've done now is that when it shoot, it rotates to where it shot. How do I make it rotates it back to where it was. I have this so for it's rotation.
    Code (CSharp):
    2.         Player.LookAt(AttackLookAtPoint);
    4.         Player.eulerAngles = new Vector3(0, transform.eulerAngles.y, 0);
    Thanks in advance!!