Using World Position and Rotation Transforms of an object
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm trying to get the world position and rotation coordinates of an object, save them in a variable, and then apply them to that object or other objects later.
The result I'm looking for would be like aligning a locator in world space to the object, then on another frame, aligning the objet to the locator. I want position and rotation to be saved in separate variables in case I only want to snap only one or the other.
I've been trying out different approaches but haven't found a solution. The rotation part doesn't behave the way I expect.
--Save the world position and rotation coordinates to variables for later use objPosVar = in coordsys world $.position objRotVar = in coordsys world $.rotation --Select a different object or move to another frame and then do this: in coordsys world $.rotation = objRotVar in coordsys world $.position = objPosVar
Maybe this has to do with the Quaternion rotations, but when I apply the objRotVar to the object or another object, it hops around in space as if I changed the postion. I want this all to be done in world space so I can snap objects no matter what heirarchy they're in.
Thanks!