Simple Question about Child Objects

Updated on January 4, 2018 in [A] Other Answers
Share on Facebook0Tweet about this on TwitterShare on Google+0Share on Reddit0
2 on December 31, 2017

Is there a way for a child object to ignore it’s parent object’s rotation with or without code?

  • Liked by
Reply
0 on January 2, 2018

Not really, the whole point of a child object is for it to inherit its parents position and rotation.

  • Liked by
Reply
Cancel
0 on January 4, 2018

I actually figured it out! Here the script in case anybody wants it:

Quaternion rotation;
// Use this for initialization
 void Awake ()
 {
 rotation = transform.rotation;
 }
 // Update is called once per frame
 void LateUpdate ()
 {
 transform.rotation = rotation;
 }

It’s pretty much the same code if you don’t want the position to change either.

  • Liked by
Reply
Cancel