Vector math - adjust the weapon in the hud

i have a few weapon models. to make them all fit in the hud, i created 2 invisible quads in each model, one indicating the camera position, and another one telling the game how the model has to be rotated.

the translation is solved. i simply take the marker position and subtract it from the weapon node by wrapping it in a node containing that translation.

my quaternion math skills are about zero, so i'm going to need some help here. what i need to do is to rotate the weapon around the y-axis (thx to the translation) so that a ray between 0/0/0 and a specific point shoots at where the camera is looking at. these two rays then will meet in infinity valley.

helping me out here will get you named in the credits.

answer quick, i'm figuring it out right now…

What's the problem of creating a few animations specifically for when the weapon is in the HUD? Just set the camera in the modeling tool at 0,0,0 set facing to 0,0,1 and set FoV depending on what you have in-game then orient it until it fits perfectly the way you want.

milkshape cannot move/rotate joints, so if the model has been done and has animations, i hae to adjust it in game

but i solved the problem yesterday.