Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Home
Help
Search
Login
Register
www.jpct.net
»
jPCT - a 3d engine for Java
»
Support
»
Camera.SLIDE
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: Camera.SLIDE (Read 5714 times)
LiuFeng
byte
Posts: 20
Camera.SLIDE
«
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);
Logged
EgonOlsen
Administrator
quad
Posts: 12298
Re: Camera.SLIDE
«
Reply #1 on:
August 28, 2007, 12:23:48 am »
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.
Logged
LiuFeng
byte
Posts: 20
Re: Camera.SLIDE
«
Reply #2 on:
August 28, 2007, 08:11:50 am »
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
Logged
EgonOlsen
Administrator
quad
Posts: 12298
Re: Camera.SLIDE
«
Reply #3 on:
August 28, 2007, 08:17:34 am »
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.
Logged
LiuFeng
byte
Posts: 20
Re: Camera.SLIDE
«
Reply #4 on:
August 28, 2007, 10:28:17 am »
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!
Logged
EgonOlsen
Administrator
quad
Posts: 12298
Re: Camera.SLIDE
«
Reply #5 on:
August 28, 2007, 10:36:08 am »
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?
Logged
LiuFeng
byte
Posts: 20
Re: Camera.SLIDE
«
Reply #6 on:
August 28, 2007, 04:50:19 pm »
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.
Logged
EgonOlsen
Administrator
quad
Posts: 12298
Re: Camera.SLIDE
«
Reply #7 on:
August 28, 2007, 05:33:14 pm »
So the camera shouldn't collide but the model should? Then use this instead:
checkCollisionEllipsoid(...)
Logged
LiuFeng
byte
Posts: 20
Re: Camera.SLIDE
«
Reply #8 on:
August 28, 2007, 10:21:57 pm »
OK, thank much
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
www.jpct.net
»
jPCT - a 3d engine for Java
»
Support
»
Camera.SLIDE