I am working on a demo using NxOgre and am making an avatar representation... What I want is an actual character (i.e. the player) and then a floating hand, which is fixed at 0.5m from the character, but move with the camera orientation (kinda like a crosshair), but still stays 0.5m from the character...
To keep this post easy to understand, think of the hand as just a small box bounding a hand shape. I'm having trouble working out the movement vector for the box each frame... I think I have an idea how to do it in theory as follows:
Code: Select all
At the start of each frame
oldPosition = hand.getPosition() ;
move main character and/or camera ;
Use the orientation of the camera and offset from character (0.5m) to get the projected new position of the hand;
moveVector = newPosition - oldPosition ;
Thanks in advance for any help!