ViewFrustum of FPS vs Maya Cameras

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
xt_hydra
Posts: 12
Joined: Sun Jul 08, 2012 2:39 pm

ViewFrustum of FPS vs Maya Cameras

Post by xt_hydra »

is it a bug that i cannot use a FPS camera to query a "direction" to send to Bullet physic by using

Code: Select all

irr::core::line3df ray = device->getSceneManager()->getSceneCollisionManager()->getRayFromScreenCoordinates(clickPosition, FPScam);
while infact i can use a Maya Camera to query the direction by using an "Irrlicht Ray"
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: ViewFrustum of FPS vs Maya Cameras

Post by CuteAlien »

That would be a bug. But I don't really expect it as the collision demo is using a fps camera and works.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
xt_hydra
Posts: 12
Joined: Sun Jul 08, 2012 2:39 pm

Re: ViewFrustum of FPS vs Maya Cameras

Post by xt_hydra »

CuteAlien wrote:That would be a bug. But I don't really expect it as the collision demo is using a fps camera and works.
you are right it work when you use irrlicht collision detector
but its like if FPS doesnt update the ViewFrustum wich cause the "RayFromScreencoordinate" to fail updating because
when i use it in bullet E.A : i try to aim at a terrain to raise the vertexes...and if i dont aim where the "camera" is facing it doesnt raise the vertexes

its like if im riding a ghost camera and i can only access the Frustum of a none updated camera

i mean i might end up copying a second Maya Cam and call it a different name just to have the current functions *sigh*
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: ViewFrustum of FPS vs Maya Cameras

Post by CuteAlien »

Can't tell anything without an example to reproduce it. But the ViewFrustum is about returning the ViewArea used by the camera - so if that would be outdated you wouldn't see... well whatever you see (fps camera is just a normal camera which is using another animator unless you use a very, very old Irrlicht, so the camera frustum is the same internally).
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
xt_hydra
Posts: 12
Joined: Sun Jul 08, 2012 2:39 pm

Re: ViewFrustum of FPS vs Maya Cameras

Post by xt_hydra »

i dont know why but the ray only work when i follow a target with the camera...otherwise the ray point at target(0,0,0) despising the camera position
but when i output camera->getTarget ,numbers are moving

thats....actually hard.. for me to understand..


i think im going nuts cause i tried to make the character follow the camera target and its moving

and i also tryed maya camera without following the character...the ray still fail

im going crazy...this is.... impossible
xt_hydra
Posts: 12
Joined: Sun Jul 08, 2012 2:39 pm

Re: ViewFrustum of FPS vs Maya Cameras

Post by xt_hydra »

actually i was going crazy... i was sending wrong position to my function...sorry guys lol
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: ViewFrustum of FPS vs Maya Cameras

Post by CuteAlien »

Problem solved :-)
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply