fps weapon positioning
fps weapon positioning
Anybody knows what is the simplest way to show a .md2 weapon in front of the fps camera , and keep it there while moving ? I'm a good c/c++ programmer , but I have no prior experience with 3d graphics. I would like to make a simple fps shooter , but I don't know how to place the weapon and the HUD. Please , help me !
Yes...
But... how i can attach the weapon model to the camera? CODE please
But... how i can attach the weapon model to the camera? CODE please
The best italian GM related site
www.gamemaker.it
www.gamemaker.it
I agree with DanyATK , what code do I need to create a child to ICameraSceneNodeFPS ? The documentation to irrlicht does not help very much...DanyATK wrote:Yes...
But... how i can attach the weapon model to the camera? CODE please
Here is the question : I have created a IAnimatedMeshSceneNode called "gun" , with .md2 model and textures. The gun appears in the screen , and I can position it in the 3d space. But its position is obsiously fixed. How can I attach the model to the camera in order to make in follow my movements ?
It's so damn easy
camera = your camera, you don't need to add this new one
gunmesh = the mesh that contains your gun model
gun = your animated scene node
camera = your camera, you don't need to add this new one
gunmesh = the mesh that contains your gun model
gun = your animated scene node
Code: Select all
camera = smgr->addCameraSceneNodeFPS();
gunmesh = smgr->getMesh("gunmodel.md2"); //your mesh is loaded here
gun = smgr->addAnimatedMeshSceneNode(gunmesh, camera, -1); //this is the important line where you make "gun" child of the camera so it moves when the camera moves
//Tweak all these values, they're different for each model:
gun->setScale(core::vector3df(14,14,14));
gun->setPosition(core::vector3df(15,-10,30));
gun->setRotation(core::vector3df(180,0,180));
-
- Posts: 602
- Joined: Sat Aug 23, 2003 2:03 am
- Location: Pottstown, PA
- Contact:
I posted a tutorial on this a while back. Also someone about 2 days ago posted this same question. Would it've been too hard to do a search???
I post my case again, we should have posting guidelines for these forums:
http://irrlicht.sourceforge.net/phpBB2/ ... ting+rules
I'll make another post today. Frankly, i've been annoyed with some of the stuff on these boards. I've actually gotten to the point where i don't even read half the posts. ex. for the beginner's forum, i look at the topics, for half of them i think "its been answered before" and press mark all topics read. I firmly believe that if we have these rules, it'd make this forum 100% better, and the community will come off as much more knowledgeable as a whole. Currently using other engine's, every other one i've worked with is under the impression that the community is a bunch of newbies. I know that this commu. is not 100% newbies, and though there are some, the newbieish clutter could be eliminated by following those rules.
So, now that this thread is way off target....... Please...Please... for the good of this community begin to follow the rules :'(
I post my case again, we should have posting guidelines for these forums:
http://irrlicht.sourceforge.net/phpBB2/ ... ting+rules
I'll make another post today. Frankly, i've been annoyed with some of the stuff on these boards. I've actually gotten to the point where i don't even read half the posts. ex. for the beginner's forum, i look at the topics, for half of them i think "its been answered before" and press mark all topics read. I firmly believe that if we have these rules, it'd make this forum 100% better, and the community will come off as much more knowledgeable as a whole. Currently using other engine's, every other one i've worked with is under the impression that the community is a bunch of newbies. I know that this commu. is not 100% newbies, and though there are some, the newbieish clutter could be eliminated by following those rules.
So, now that this thread is way off target....... Please...Please... for the good of this community begin to follow the rules :'(
-
- Posts: 602
- Joined: Sat Aug 23, 2003 2:03 am
- Location: Pottstown, PA
- Contact:
creative use of AND (all caps, and not + like most other engines) narrows the search down, ex. a quick search of :
fps AND weapon turned up only 2 pages, most with the question answered somewhere
the search isn't shitty, just the keywords that ppl use are shitty. ex. searching for fps weapon would turn up every post in the forums with fps or weapon in them somewhere. as would fps + weapon and it'd also include everything w/ a +
AND, NOT, OR are the keys
fps AND weapon turned up only 2 pages, most with the question answered somewhere
the search isn't shitty, just the keywords that ppl use are shitty. ex. searching for fps weapon would turn up every post in the forums with fps or weapon in them somewhere. as would fps + weapon and it'd also include everything w/ a +
AND, NOT, OR are the keys