Problems with odejava / rays / geoms

Hi,

i use odejava for all collisonsdetections and i use GeomRay for collisionsdetection of bullets<->Objects. When rays collide with bodygeom’s its works fine, but i dont get collisions between Rays and Geoms [eg: Bullet hits Character work / bullet hits house dont work]

any idea ? thanks for help

initmyworld:

    world = new World();
    world.setGravity(0f, -9.81f,0);
    world.setStepInteractions(10);
    world.setStepSize(0.05f);

    space = new QuadTreeSpace(
          new float[]{0,0,0},
          new float[]{200,200,200},
          4
          );
    
    collision = new JavaCollision(world);
    contact =
        new Contact(
            collision.getContactIntBuffer(),
            collision.getContactFloatBuffer());

update my world:

    collision.collide(space);
    iterateContacts();
    collision.applyContacts();
    world.step();

iteratecontacts:

    for (int i = 0; i < collision.getContactCount(); i++) {
          contact.setIndex(i);
                            // Doing some things / checks...
    }

Hi Peter Schnitzel - or should I say Heinz :wink:

non-body geoms simply don’t generate contacts with other non-body geoms - they are not even checked.
From the ode docs: “Collisions between bodies or between bodies and the static environment are handled as follows:…”

That’s better in JOODE, where you can implement your collision handler directly… hmm maybe in ODEJava you can do that too…