Camera.SLIDE

Started by LiuFeng, August 27, 2007, 07:55:44 PM

Previous topic - Next topic

LiuFeng

help me explain why Camera.SLIDE not work:

theWorld.checkCameraCollisionSpherical(new SimpleVector(20,20,20), 3, len, Camera.SLIDE);


EgonOlsen

I can't answer that without more information or a test case that shows where it should slide but doesn't. However, usually you'll be better off with ellipsoid collision detection anyway, so consider using that instead.

LiuFeng

i want to make camera to able to go through the obstacle , and i use:

theWorld.checkCameraCollisionSpherical(new SimpleVector(20,20,20), 3, len, Camera.SLIDE);

but camera not able

EgonOlsen

Use an ellipsoid collision method instead. They always slide. Sliding with the spherical approach is limited and doesn't do what one would expect in all cases.

LiuFeng

like in JPCTDemo i already use:

theWorld.checkCameraCollisionEllipsoid(delta.normalize(), new SimpleVector(20, 20, 20), len, 3);
     
but the camera still not able????

if i disableCollisionListener of theWorld , orther Object3D able to slide ,i don't want it



help me!

EgonOlsen

Try to play around with recursion depth and/or Config.collideEllipsoidThreshold/Config.collideOffset or your ellipsoid size. Maybe 20 is too big in respect to the world dimensions you are using.
What does it do instead? Are you walking thorugh the walls? Are you getting stuck in front of them?

LiuFeng

in JPCTDemo i repair: add a human in to the world and move camera fllow this human, and only want the human able to collision and camera not.

EgonOlsen

So the camera shouldn't collide but the model should? Then use this instead: checkCollisionEllipsoid(...)

LiuFeng