Original Post
I have two 3d xfile meshes, 1 is the player ,the other is the
gun, I have no problem rotating the gun around with the player,
but I have no idea how to aim the gun depending on what angle they are facing. If the gun is turned to 0 degrees than I rotate it around the z axis, if the gun is turned to 90 degrees then
I rotate it around the x axis to aim it, but what if the gun is
turned to 10 or some other odd number degrees. How do you calculate how much to rotate each axis to keep the gun straight as you are aiming it.
Any examples would be great, I program in vb but i am just looking for the math or which dx function to use anyway
so if you use c++ it shouldnt matter.
Thanks in advance,
Mike Tari
mtari@mnsi.net