JAVA3D Collision Detection.

Hello.
What is the best way to add collision detection to my scene.

Using CollisionBehavior which working on my avatar
or using the Pick method (like in j3d tutorial)?

Where can I find good examples and explanations?

Thanks Sharon Lin.

Check out

http://j3d.org/

there are some really good tutorials on this.

Picking is preferable.

Its pretty easy to do some terrain following and collision avoidence with that. But it does tend to generate alot of garbage in Java3D. Another option is to have a ‘shadow’ scene where you fast can look up structures, terrain heights and similar things. This ‘shadow’ is also be useful when implementing AI behaviour.

Regards
Nikolai

We currently use picking and works ok. But we really notice that it is not cheap, esp. when picking against large geometry like terrain.
As soon as we can, we will release the 3D engine from the collision/picking tasks and do it on the logical level (e.g. on the heightmap in favor to terrain polygons).