InitialPosition, InitialOrientation and InitialScale

For real this time

By this I mean replace the current implementation as it's useless.

Then what is needed is the rotation applied to an object from baseline of 0,0,0

Then return the translation of the object, how it was moved in the scene from baseline of where it is if placed at the origin.

Then return the scale if they have adjusted it from baseline of 1.

I could care less what the orientation, translation and scale are from the export of some 3D tool. At the moment you put it in the inventory it has a baseline of position = origin, no rotation and scale of 1. From there I need to know how has the user altered these 3 things.

This is so fundamental to any generalized scripting manipulation of objects.

To verify it is implemented correctly place an object in the scene at the origin.

ObjectPrivate.InitialRotation.GetEulerAngles() * Mathf.DegreesPerRadian should return <0.0, 0.0, 0.0>

ObjectPrivate.InitialPosition should return <0.0, 0.0, 0.0>

ObjectPrivate.InitialScale should return 1.0

Then translate, rotate and scale the item. Call the same methods again. The values it reads out should match exactly what is in the edit panel of the object you altered.



Please sign in to leave a comment.