Camera Stuck In Mesh

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
kklouzal
Posts: 343
Joined: Sun Mar 28, 2010 8:14 pm
Location: USA - Arizona

Camera Stuck In Mesh

Post by kklouzal »

What could be the reasons/solutions for the camera getting stuck inside of a mesh?

I'm using an OctreeTriangleSelector on an OctreeSceneNode and attaching it to the camera with this collision response animator:

Code: Select all

createCollisionResponseAnimator(
                                        TriangleSelector, Camera_Main, irr::core::vector3df(5,24,5),
                                        irr::core::vector3df(0,-0.001F,0),
                                        irr::core::vector3df(0,50,0));
Even with that low of gravity I'm still getting stuck inside the mesh just from walking around on it..
Dream Big Or Go Home.
Help Me Help You.
smso
Posts: 246
Joined: Fri Jun 04, 2010 3:28 pm
Location: Hong Kong

Re: Camera Stuck In Mesh

Post by smso »

I think the ellipsoidTranslation parameter: irr::core::vector3df(0,50,0) (which defaults to 0) is suspicious.

Regards,
smso
kklouzal
Posts: 343
Joined: Sun Mar 28, 2010 8:14 pm
Location: USA - Arizona

Re: Camera Stuck In Mesh

Post by kklouzal »

I tried to use the default 0, I tried to make the ellipsoid radius larger, I tried to move the translation up, down, increase/decrease the slide value, increase/decrease the amount of polys per node on the Mesh and the TriangleSelector, Decrease the gravity..

Nothing I seem to do makes the situation any better.. :(
Dream Big Or Go Home.
Help Me Help You.
smso
Posts: 246
Joined: Fri Jun 04, 2010 3:28 pm
Location: Hong Kong

Re: Camera Stuck In Mesh

Post by smso »

Try another mesh and/or turn on the debug data of the node.

Regards,
smso
kklouzal
Posts: 343
Joined: Sun Mar 28, 2010 8:14 pm
Location: USA - Arizona

Re: Camera Stuck In Mesh

Post by kklouzal »

Thank you for all the help, It was a scaling issue, I turned down the scaling and increase the ellipsoid radius and it only ever happens once in a blue moon. I suppose that is acceptable :P
Dream Big Or Go Home.
Help Me Help You.
Post Reply