pasting a pistol

Blitz3D Forums/Blitz3D Programming/pasting a pistol

Rook Zimbabwe(Posted 2004) [#1]
Got the mesh landscape looking good. Got the gunsight on the screen. Got a b3d model of a pistol I want to use.

How do I paste the pistol on the screen so that it moves with me???


Mr Snidesmin(Posted 2004) [#2]
Hello,

You need to attach the mesh to the camera entity using the camera as the parent:

using code archive:
http://www.blitzbasic.com/codearcs/codearcs.php?code=524

PlayerCam = CreateCamera()
gun_mesh = LoadB3D("gun.b3d", PlayerCam)

;then position the gun just in front of the camera:
positionentity gun_mesh 2, -2, 4

Hope this helps. . .


Rook Zimbabwe(Posted 2004) [#3]
YEAH!!! Now I can kill the Orcs!!! Um... after I do the missle code for the bolt!
: )
Rook