Search Unity

Rotating object

Discussion in 'Scripting' started by Venominus, Nov 22, 2017.

  1. Venominus

    Venominus

    Joined:
    Sep 5, 2015
    Posts:
    25
    When I rotate 3d object in unity manually it changes it's z rotation and x,y position so it stays in the same location (doesn't move only rotate), but when I rotate it in script it doesn't change position, only changes rotation and moves. How to rotate around z axis and change x,y position, so it stays in same place and only rotates?
     
  2. Venominus

    Venominus

    Joined:
    Sep 5, 2015
    Posts:
    25
    Oki, I made it I made a empty object at center of this object and made that object a child of it and rotate empty object at center.