FPS Camera Tutorial

A forum to store posts deemed exceptionally wise and useful
Tech^salvager
Posts: 32
Joined: Sat Sep 18, 2004 11:53 pm
Location: Portland, Texas, USA

Post by Tech^salvager »

Why don't you post the code up of your having trouble with it?
guest001

fps camera tutorial

Post by guest001 »

:roll: I couldn't get the weapon to be there,i copyed the tutorial code word for word,but it is not there althougth the code compiled without any errors so i don't know what the ' :evil: ' is wrong with the code!! :?:
Guest

Post by Guest »

Same here.
Is setPosition() relative to the parent, or it world coordinates? That might be the problem, but I called it with the camera position + 5 or 10 and it still isn't visible.
Guest

Post by Guest »

Thats because of your model, keep trying to re-position. You'll get it right sooner or later :lol:
Guest

Post by Guest »

That, and checking output via EDT_NULL, it says something about no texture or materials or something, so I'm guessing it's drawn invisible.
Artenius
Posts: 8
Joined: Wed Aug 31, 2005 4:29 pm
Location: a 3d matrix full of things I don´t understand now.

Post by Artenius »

I had the same problem. It´s long I am working only on code and not on modelling. But I guess the problem is about the way model was exported. I haven´t used the irrlicht official exporters and maybe it is about that. I won´t test it right now tho...
Th3one
Posts: 17
Joined: Fri Nov 25, 2005 11:43 am

Post by Th3one »

Not sure if it helps guys, but the code i use to show my weapon in fps is

Code: Select all

scene::IAnimatedMesh* weapon = smgr->getMesh("../../Static Meshes/assaultrifle.3ds");
	scene::IAnimatedMeshSceneNode* weapon1 = smgr->addAnimatedMeshSceneNode( weapon );

	weapon1->setParent(camera);
    weapon1->setPosition(core::vector3df(72,-80,110));
It displays it in the bottom right corner of the screen.
Hope this helps...
Guest

Post by Guest »

This wouldn't matter because all models are different. You guys just need to keep re-positioning until you get it right.
Post Reply