Page 1 of 1

ViewFrustum of FPS vs Maya Cameras

Posted: Wed Oct 30, 2013 5:03 pm
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"

Re: ViewFrustum of FPS vs Maya Cameras

Posted: Wed Oct 30, 2013 9:16 pm
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.

Re: ViewFrustum of FPS vs Maya Cameras

Posted: Wed Oct 30, 2013 11:13 pm
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*

Re: ViewFrustum of FPS vs Maya Cameras

Posted: Wed Oct 30, 2013 11:47 pm
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).

Re: ViewFrustum of FPS vs Maya Cameras

Posted: Sun Nov 03, 2013 10:15 pm
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

Re: ViewFrustum of FPS vs Maya Cameras

Posted: Sun Nov 03, 2013 11:41 pm
by xt_hydra
actually i was going crazy... i was sending wrong position to my function...sorry guys lol

Re: ViewFrustum of FPS vs Maya Cameras

Posted: Mon Nov 04, 2013 11:10 am
by CuteAlien
Problem solved :-)