I am not new to Java, but am to jPCT! I must say, so far I am really impressed!
I am trying to solve this issue, I cannot register a callback even when my objects supposedly collide. Any input? I'm using the same object twice.
Init:
OnDrawFrame:
Override "collision":
Can't wait to find out what I did. My first attempt at 3D.
Bob
I am trying to solve this issue, I cannot register a callback even when my objects supposedly collide. Any input? I'm using the same object twice.
Init:
Code Select
floor = Loader.load3DS(res.openRawResource(R.raw.object), 1)[0];
walls = Loader.load3DS(res.openRawResource(R.raw.object), 1)[0];
floor.translate(0, 0, -10);
floor.setName("floor");
floor.setCollisionMode(Object3D.COLLISION_CHECK_OTHERS);
floor.addCollisionListener(this);
walls.translate(0, 0, 0);
walls.setName("walls");
walls.setCollisionMode(Object3D.COLLISION_CHECK_OTHERS);
walls.addCollisionListener(this);
world.addObject(walls);
world.addObject(floor);
walls.strip();
floor.strip();
OnDrawFrame:
Code Select
SimpleVector s = floor.getCenter();
floor.translate(s.x, s.y, s.z+1);
Override "collision":
Code Select
Log.d("COLLUSION DETECTED!!!", "!!!!!!");
Can't wait to find out what I did. My first attempt at 3D.
Bob