Where is the FPS camera target??

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
d00d
Posts: 7
Joined: Tue Jan 23, 2007 7:07 pm

Where is the FPS camera target??

Post by d00d »

hey, im just wondering where the fpscam defaultly positions its target. im trying to pick a scene node that collides with a 3d line i made that goes from the camera out in the direction that you are looking. I tried the tutorial math and it didnt really work. it always picks the player node (an emptySceneNode that is kept updated to the camera position. its postion is set to that of the camera's position right before a draw.) So then i tried simply setting the end of the line to the target multiplied by 10000 (as to make it really long) but it still picked the Player node, so i set the start to the target, and the end to the targetx10000 and it STILL picks player node.. sometimes. every once i a while, if im near a wall or soemthing it will pick the level. can anyone help me? i tried returning the cam.getTarget.getX() and everything to console, but all (x,y,z) the numbers are always changing, and sometimes really small like 2.145E-15 :O even if you cant help that much, could someone at least tell me what the rules are that irrlicht uses to set the position of the fpscam target???

Edit: srry, im using JIrr.. in C++ itd prolly be cam->target->x (?)
gfxstyler
Posts: 222
Joined: Tue Apr 18, 2006 11:47 pm

Post by gfxstyler »

i think the target points to the direction you are looking, but im not sure.

see CCameraFPSSceneNode.cpp
Post Reply