Legume Posted August 1, 2015 Share Posted August 1, 2015 Hi Everyone,I am trying to work on some furniture and I am having trouble wrapping my head around rotation math I need for it.I have a "Helper" object that can be rotated and subsequently rotates the avatar on the furniture. It reports how much it has rotated to the main script which then adjusts the avatar the same amount.I have adjusting the position working fine and adjusting the rotation works fine when the main object's rotation is <0, 0, 0>.The trouble comes when the main object is rotated. I am rotating the helper object in the X direction (for example) but the avatar is rotating in the Y direction (also for example, depending on the furniture's root prim is rotated).I know that there is some rotation math that needs to be done to the incoming rotation but I just can't figure out what that math is.Note: I have been working in vectors but if things are explained in more general terms or in rotations I can probably convert between them.To summarize:- I have an incoming rotation vReported which is a delta rotation in Global co-ordinates.- I have the current rotation of the avatar sitting on the furniture vAvatar in Local co-ordinates.- I have the current rotation of the furniute root prim vObject in Global co-ordinates.- The new avatar position = vAvatar + (vReported <Somehow convered to local co-ordinates with vObject>). Can someone help me understand how to do this step?Thanks,legume. Link to comment Share on other sites More sharing options...
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now