Java3D & collision avoidance
Posted on 2003-03-26
i'm trying to program a 3D virtual space in Java3D with avatars moving around. To simplify the problem: I have a Branchgroup for my world and one for my avatar. When I check for collision between this two branchgroups with WakeupOnCollisionEntry and WakeupOnCollisionExit I get a strange result. When my avatar is inside my world I always have collision. It doesn't react with the walls from my world but with my whole world. As soon as I move the avatar away from the world the collision stops. It seems like every branchgroup has a sphere (or something like this) around it and Java3D does a simple collision check looking only this spheres and not the real surfaces and, because my avatar is in the world, the avatar's sphere is also in the world's sphere and this gives collision.
Can anybody tell me how to avoid collision with other surfaces on the world and how to add it to my avatar's branchgroup? And, if possible, where to find a good tutorial and/or source code?