playMaker

Author Topic: Bug regarding set parent action  (Read 1910 times)

Disastercake

  • Full Member
  • ***
  • Posts: 101
  • www.disastercake.com
    • View Profile
    • Disastercake
Bug regarding set parent action
« on: May 13, 2012, 09:44:23 PM »
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.

Soul Saga - Anime themed adventure RPG by Disastercake

http://www.disastercake.com

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3630
  • Official Playmaker Support
    • View Profile
    • LinkedIn
Re: Bug regarding set parent action
« Reply #1 on: May 15, 2012, 10:28:54 AM »
Check that your parent object has default scale. Non-uniform scale in the hierarchy can also cause problems...

Disastercake

  • Full Member
  • ***
  • Posts: 101
  • www.disastercake.com
    • View Profile
    • Disastercake
Re: Bug regarding set parent action
« Reply #2 on: May 15, 2012, 12: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.
Soul Saga - Anime themed adventure RPG by Disastercake

http://www.disastercake.com

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3630
  • Official Playmaker Support
    • View Profile
    • LinkedIn
Re: Bug regarding set parent action
« Reply #3 on: May 15, 2012, 12: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...

Disastercake

  • Full Member
  • ***
  • Posts: 101
  • www.disastercake.com
    • View Profile
    • Disastercake
Re: Bug regarding set parent action
« Reply #4 on: May 15, 2012, 02:16:08 PM »
Doing that actually still makes the bug occur for some reason. =/
Soul Saga - Anime themed adventure RPG by Disastercake

http://www.disastercake.com

Disastercake

  • Full Member
  • ***
  • Posts: 101
  • www.disastercake.com
    • View Profile
    • Disastercake
Re: Bug regarding set parent action
« Reply #5 on: May 16, 2012, 07: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?
Soul Saga - Anime themed adventure RPG by Disastercake

http://www.disastercake.com