GUN For FPS Games

Irrlicht.Net is no longer developed or supported, Irrlicht.Net Cross Platform is a much more complete wrapper. Please ask your C# related questions on their forums first.
Locked
Unforgivable.Course
Posts: 46
Joined: Tue Feb 07, 2006 6:28 pm

GUN For FPS Games

Post by Unforgivable.Course »

hi

i want to set a gun to my FirstPersonCamera but i don't know how to do it !!
i used the Position function of the camera but it's nasty because it haven't prepare connection to my camera , please put a code for first person shooter gun in vb.net or anyone . Code & Algorithms Needed . Thanks alot
Get Ready For an Amazing Journey Into the World of Game Development
rwh7hrh7we

Post by rwh7hrh7we »

search the forum...

you have to add the node to the camera like this

camera.addchild(weapon)
Unforgivable.Course
Posts: 46
Joined: Tue Feb 07, 2006 6:28 pm

Post by Unforgivable.Course »

god damn , every body say me that (add child , parent )
do u tested it ??? it don't work . i know that i must use position and rotation but still have problem . the gun is left of the camera and i need it in right of the it . it cann't be with position.x & position.z isn't it ??
help me with your codes . tnx
Get Ready For an Amazing Journey Into the World of Game Development
rwh7hrh7we

Post by rwh7hrh7we »

yes i tested it

... read the doc....

make the weapon child and then adjust the position of your gun to the position you want...
TSM

Post by TSM »

I can also verfy that was rwh7hrh7we said will work as I have used it several times
RapchikProgrammer
Posts: 279
Joined: Fri Dec 24, 2004 6:37 pm

Post by RapchikProgrammer »

I always used that and am currently developing a game so just used it. It works fine! Just remember that when you attach it to the camera the position of the objective is relative to the camera. If you write (10,15,10) that means (cameraposx + 10, cameraposy + 15, cameraposz + 10).

Now you can simply download this program it teaches several function including the gun question you are asking:
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=12031
Locked