THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 10/09/2012 at 12:07, xxxxxxxx wrote:
Hello, I'm running into a problem with the rotation of an object created by a Python Generator. I want the object returned by it to always stay at the same position, rotation and scale, regardless of what happens to the Python Generator object and any parent it might have. I have the position not moving with :
StayStillObj.SetAbsPos(StayStillObj.GetMg().off - op.GetMg().off)
How would I do a similar thing with rotation?
def GetGlobalRotation(obj) :
return utils.MatrixToHPB(obj.GetMg())
StayStillObj.SetAbsRot(-GetGlobalRotation(op))
But that doesn't work once more then one axis is rotated.Any ideas of how to get that working? Any help would be greatly appreciated.
Daniel