Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

I don't get rotations between parent and child

Discussion in 'Physics' started by Thomas12, Feb 23, 2015.

  1. Thomas12

    Thomas12

    Joined:
    Dec 24, 2014
    Posts:
    36
    Hello,

    I'm trying to understand rotations between parent and child but I failed so far.
    I have a parent game object. It's rotated 30degrees along the (global) x axis.
    Then I set a cube as child and reset it. It is automatically tilted 30 degrees along the global x axis as well and in the inspector, for its rotation, 0 0 0 is marked.

    Then I try to increase the field X for Rotation in the inspector for the cube. This move the local Z and Y axis of the cube, the X axis does not change. Surprise : if I then play with Z, it does not make rotate the cube according to the local Z axis from the parent but only according to the local Z axis from the cube which does not match with the local Z axis from the parent anymore since I changed X.

    Once Z has been changed, changing again X makes rotate the cube around the X local axis from the parent (it seems like it).

    Even more confusing: if I change then Y, it makes (apparently) rotate the cube around the local Y axis from the parent. But then, playing again with X makes rotate the cube around and axis... not matching with either the local X axis from the child itself or the parent. What's going on here? It seems completely random. What am I missing?