Need Help with working with PhysicRay

Hello all,

At the Moment I try to use the PhysicsRay of JMEPhysics, and I wanted to get the length over the ContactCallbacks. But nothing happened.

Is there a Problem when Ray alraedy collide with same PhysicsNode?

Or is ther another way to get the Coliding infos?

.:emp...hellg:. said:

Is there a Problem when Ray alraedy collide with same PhysicsNode?

Hmm, don't think so. But I didn't use rays very often. Try it in a test and report what the actual problem is.

In ContactCallbacks I read out the contact.getGeometry1 & 2 der was never PhysicsRay in Collisions.

But in PhysicsDebugger I see them.

Now I thought, I have to go lower, and asked direktly Ode.dGeomRayGetLength(SWIGTYPE_p_dGeomID ray)

but there where always all values 17.3f. Dont know what this mean.

I can remember one Year ago, I worked with ODEJava directly, the length of the Rays didnt change, but I got CollisionInfos.

OH, have the Rays to be in a StaticPhysicsNode instead of Dynamic? I'm just not at home would try this later.

Now I tried it with the staticNode!

Wenn I call contact.getNode I got "null (com.jmex.physics.impl.ode.DynamicPhysicsNodeImpl)"

and the hardest is, when I call contact.getgeometry I got a native Error:

ODE Internal Error 1

asertion "Index >= 0 && Index <(Flags & NUMC_Mask)" failed in c:…srccolission_util.h:46

Any Idea waths wrong there?  :?

the Error comes also without calling ContactCallBack

Did you run the ray tests from CVS? Do they work? What do you try more than that?

I don't understand this.

With the Collisioneventhandler it works sometimes. but the error comes always.

Perhaps I should ask this at ODE direct?

I think about taking capsules for this stuff, or realy loooong pyramids :slight_smile: