playMaker

Author Topic: GET ROTATION (SELF-WORLD)  (Read 2001 times)

PolyMad

  • Hero Member
  • *****
  • Posts: 545
GET ROTATION (SELF-WORLD)
« on: April 01, 2013, 01:23:58 AM »
I have a funny noob and probably very, very stupid question.
In GET ROTATION we have the option for WORLD and SELF.
I cannot understand what SELF is for.
Because if I rotate by 10 degrees, then respect to me I'm still rotated by 0 degrees, I am rotated by 10 degrees respect to the world, right?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: GET ROTATION (SELF-WORLD)
« Reply #1 on: April 01, 2013, 05:24:39 AM »
Hi,

 the self means compared to its parent.

 so checking "SELF" will return the rotation of this gameObject within its parent transform. The confusing part is that if it's not parented, then it's the same value as if you selected "WORLD"

do this test. have a moon parented to the earth.

 if you rotate the earth, the "Self" rotation of the moon doesn't change, but the "World" rotation of the moon does.

 Does that clarify things?

bye,

 Jean

PolyMad

  • Hero Member
  • *****
  • Posts: 545
Re: GET ROTATION (SELF-WORLD)
« Reply #2 on: April 01, 2013, 07:13:25 AM »
Yes of course! Thank you very much, man!  ;D