So I have a model of a spear and when it gets thrown I want to set the orientation of the spear to its direction. ( I also want to use this for other things like bullets pointing in the direction they are moving in)
my Models local forward Vector is +Z and I have the direction that it is moving in (in world space) from the velocity but I can't work out how to rotate it locally so that it is always pointing the right direction.
I tried to work out the difference in the angles and then create a Rotation matrix to apply to its rotation, but that didn't give me the desired results.
I am working in DirectX. Any help would be appreciated