Collision Detection

Hi,

I need simple collision detection in my Xith app. Can somebody give me a brief introduction how to set up my scene graph to detect collision?

I know the Xith3DCollisionDropTest example, but I’m not sure if this is the kind of collision detection I’m looking for, since its main purpose seems to be gravity/force simulation.

All I need is to get notified if movable node A bumps into static node B.

Thanks in advance!

Johannes

The question is do you want to prevent it from bumping, or do you just want to get notified, when this “error” happens? If you want to prevent it from bumping into it I would suggest using odejava. It manages then everything for you.

arne

PS: If you want such collission detection you’ll have to use Forces anyways.

On the xith site (xith.org) is a demo maze3d which uses the xith collison system. Prretty easy to implement the same approach as in this demo. This approach allows you to bounce back on a collison, slide along walls, and had gravity on/off a jumping option etc.

I don’t have my source with me our I would have code examples. Give it a try and I will add addiional info later.

[quote]The question is do you want to prevent it from bumping, or do you just want to get notified, when this “error” happens?
[/quote]
Actually I want to prevent it. But I could handle this on my own if I would get notified. So I think ODE is not necessary in my case.

In the class com.xith3d.scenegraph.Group are methods like setCollisionBounds and so on. I thought that they may are used somehow for collision detection. What kind of purpose do they serve? Are these methods called by ODE?

I downloaded maze3d a few days ago but since I had difficulties to start it on the first attempt I left it untouched so far. But I just tried the JWS and this works perfectly. I will have a look at it again.

The Xith collision system is something started originally by David Yazel, and abandoned.
It’s not garanteed it’s working anymore, and many of us use Odejava.

Yes… isn’t the collide package being removed from the xith core soon?

I don’t know.
Maybe KevGlass or WillDeniss can answer.