playMaker

Author Topic: How to stop GameObject using 'Set Parent' from inheriting scale, etc [SOLVED]  (Read 6969 times)

markinjapan

  • Full Member
  • ***
  • Posts: 103
Hi,

This might be a question for Unity Answers but I was wondering if there was a way to stop a Gameobject from inheriting values (scale, rotation, etc) from whatever it's parented to? Maybe a setting in 'Set Parent' to ignore parents scale, rotation, etc?

Thanks
« Last Edit: April 10, 2012, 11:58:49 PM by Alex Chouls »

Groo Gadgets

  • Beta Group
  • Full Member
  • *
  • Posts: 175
Heya,

Would it be viable for you to use the "Set Position" action instead of "Set Parent"?

That's what I do when I don't want to inherit a parents rotation   ;D

Cheers,

Simon

markinjapan

  • Full Member
  • ***
  • Posts: 103
Hi,

No, I can't do that since I am using objects that use physics (rigidbodies, etc). Also, they have to move whilst on the object (rotating, etc) so setting their position is not possible.

I found a solution which kind of works, bit ugly, but for my quick prototypes it works fine. I ended up making all the scaled objects (that I parent to) children of an empty gameobject that has default scale (rotation, i think, doesn't matter).

I also made sure that my Player gameobjects models, etc were all default (had to re-export all the models at the correct scale and orientation though). Bit of a pain but it kind of forces you to get everything clean instead of quickly hacking it with odd rotation, scale values.

Hope that helps someone with similar problems. Took me a few hours to figure it out :)

Mark

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4000
  • Official Playmaker Support
    • LinkedIn
Thanks for sharing your solution! Using extra nodes in the hierarchy with default transforms seems to be a common solution to parenting problems...