www.jpct.net
jPCT - a 3d engine for Java => Support => Topic started by: LiuFeng on August 27, 2007, 07:55:44 pm
-
help me explain why Camera.SLIDE not work:
theWorld.checkCameraCollisionSpherical(new SimpleVector(20,20,20), 3, len, Camera.SLIDE);
-
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.
-
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
-
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.
-
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!
-
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?
-
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.
-
So the camera shouldn't collide but the model should? Then use this instead: checkCollisionEllipsoid(...) (http://www.jpct.net/doc/com/threed/jpct/World.html#checkCollisionEllipsoid(com.threed.jpct.SimpleVector,%20com.threed.jpct.SimpleVector,%20com.threed.jpct.SimpleVector,%20int))
-
OK, thank much