Hi,
I use the object.xReference attribute to rotate (transition.to) an object about an axis other than the default Reference point. My problem is, that whenever I reset the object.xReference property or change it to a different value for another transition.to the object jumps to a point where it would have ended up if I hadn't set the object.xReference for the previous step.
The animation consists of many steps which are defined in a table imported from a json file. That means I cannot hard-code the reset of the object position after I change the xReference attribute.
I tried to programmatically calculate the x and y distance the object would have to be moved to retain it's position, but since the rotation can start at any angle and end at any angle even a simple sin/cos calculation gets a bit crazy. Also, the object 'jerks' if I try to reset it after changing the x/y reference values.
Is there a way to reset the reference points without the object moving?
Thanks for your help.
Best, Oliver