Page 1 of 1

little editor bug -> parenting

PostPosted: Sat Mar 26, 2011 9:50 pm
by sonicfire
hi there!

just discovered that when you have an actor somewhere on the screen and set it to "parent -> view" then close the window, open it again, choose "parent-> none" for the same actor, it pops / reverts to 0,0 in coordinate space :)

intended or a bug?

cheers !

Re: little editor bug -> parenting

PostPosted: Sat Mar 26, 2011 9:55 pm
by Kodo
I found that you can avoid it popping back to 0,0 if after you change the parent to 'none' you just select and hold the mouse button down on the actor as though to drag it for a second then release. It does seem like a bug to me, or at least I haven't thought of a reason why it should reset its position.

Re: little editor bug -> parenting

PostPosted: Sat Mar 26, 2011 10:07 pm
by Game A Gogo
What happens is the coordinate are not transformed, since when an actor is parented to another actor, the child actor has his x and y coordinates relative to it's parent.

Lets say the view was at (40,20) and another actor at (40,40). When you parent the actor to the view, it's coordinate will become (0,20). but if you remove the parent, the coordinates are unchanged... so it will become (0,20) relative to game center instead of view.

So yes, this is a bug. And like kodo said a way to fix this is to drag an object by a pixel before moving the working area around

Re: little editor bug -> parenting

PostPosted: Mon Mar 28, 2011 10:58 am
by sonicfire
Thanks guys :) It´s not annoying me or something - just wanted to let you know.