Dashboard_avatar
Feb 10, 2010
Post id: 301643 Report Item

I have a simple script which will check an object to ensure that the local pivots match the object origin because our exporter from maya to our game engine does not support maya's notion of individual rotate and scale pivots.

However, even when the local rotate and scale pivots are "zero", both in the attribute editor and when I query them using "xform", the values are not truely zero.

I can only truely set the pivot values to zero when i use "xform" to set them to zero.



Dashboard_avatar
Feb 17, 2010
Post id: 301751 Report Item

Welcome to the wondnerfull world of floating point arithmetics.

Dashboard_avatar
Feb 17, 2010
Post id: 301763 Report Item

Heh, thanks. :) I was hoping that Maya's notion of Freezing transforms would actually create a value of pure zero...

So the only way to truly create a value of pure zero in Maya is through the xform command?

Dashboard_avatar
Feb 17, 2010
Post id: 301766 Report Item

The thing is that almost all applications that deal with floating points tend to do this, even if you expect the value to be absolutely zero, because you set it doesn't mean its actually 0 but a teeny weeny number, reason being that floating point operations are not exactly 0. Presumably because the operation si not set for some reason but it gets computed on to decompose the value, and rounding DOES happen.


Incidentally the guys who developed the whole notion of computers were highly against floating point arithmetic for this particular reason.