Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: Cwal on April 11, 2014, 06:38:26 PM

Title: Scaling in Drag & Drop example
Post by: Cwal on April 11, 2014, 06:38:26 PM
I made a simple modification to the drag and drop example, to handle dragging an object onto a differently scaled one.  I manually instantiate the object rather than using AddChild, and set the scale to one before parenting it.  The problem I have encountered is that when the object is rotated using quaternions, that it changes shape, despite every value in the inspector being identical to a non rotated child.

As you can see in this example image from the editor, the only different value in the inspector is rotation.  If I  adjust the scale, it goes back to looking the way it should.  Is this a Unity error?
Title: Re: Scaling in Drag & Drop example
Post by: ArenMook on April 12, 2014, 04:42:34 AM
That's just because of how Unity combines the transforms. It skews the final object. It's one of those issues that I've tried to get changed on many occasions, even while I worked at Unity. It's a well-known issue, and last I heard it was one of those changes that may get fixed in Unity 5.