I’m having trouble getting a 3d model of a weapon to render just in front of the camera.
I’ve been able to find a few short descriptions on the web which indicate there may be about 3 different (common) ways of doing this:
Using the position of the camera, the viewpoint of the camera and some distance-formula math to draw the model.
Turning off the z-buffer and drawing the weapon last? Not sure about this one.
Applying the same tranlations/rotations as the camera to draw the model in the same spot.
I’ve come close with #1 - the weapon is the correct distance from the camera, but when the camera rotates left/right, the weapon ‘circles’ the camera erratically!
If anyone can help me out with this I’ll be
really thankful!