Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Disastercake on May 14, 2012, 12:44:23 AM

Title: Bug regarding set parent action
Post by: Disastercake on May 14, 2012, 12:44:23 AM
If I do set parent after creating an object, it becomes ridiculously tiny.

However, if I don't set the parent, the object is the correct size.  Also, I tried it by creating the object, then making it wait for another click before setting the parent, and this method maintained the correct size of the object.

Any idea how to fix this issue?  It's going to be very important for me to be setting parents as soon as an object is created.

Title: Re: Bug regarding set parent action
Post by: Alex Chouls on May 15, 2012, 01:28:54 PM
Check that your parent object has default scale. Non-uniform scale in the hierarchy can also cause problems...
Title: Re: Bug regarding set parent action
Post by: Disastercake on May 15, 2012, 03:45:32 PM
Where would I set the "uniform scale" option?

Also after messing with the bug, I found that if I remove the starting animation (that I made with the animation tool in Unity and plays on creation) that the object appears fine.  It appears to be bugging out because of the animation.
Title: Re: Bug regarding set parent action
Post by: Alex Chouls on May 15, 2012, 03:50:55 PM
Uniform scale just means the x, y, and z scale values in the Transform component are the same.

You could try not having the animation play automatically, and play it with Playmaker after parenting...
Title: Re: Bug regarding set parent action
Post by: Disastercake on May 15, 2012, 05:16:08 PM
Doing that actually still makes the bug occur for some reason. =/
Title: Re: Bug regarding set parent action
Post by: Disastercake on May 16, 2012, 10:56:29 AM
I figured out that the reason the spawning child object is doing this is because it's scaling relevant tot he parent's space, not the world space.  Do you know how I can make it so the child is being scaled at world space rather than the parent's local?