Hi i don’t know the way for use this Package com.xith3d.collider with a simple cube and camera.
Where i can find a good tutorial or some help.
Thanks !
Hi i don’t know the way for use this Package com.xith3d.collider with a simple cube and camera.
Where i can find a good tutorial or some help.
Thanks !
no tutorial or help I’m afraid, and I can’t help you either (as I don’t use that package for my collision)
The best you have is an example:
src/com/xith3d/test/Xith3DCollisionDropTest
JWS: http://xith.org/jws/jws-com.xith3d.test.Xith3DCollisionDropTest.jnlp
You can also read the javadoc - and the source code itself.
Will.
You might want to take a look at the source code for David Yazel’s Quake 3 level loader demo:
It uses the collider package with a dummy avatar node used for movement of the camera and collisions with other geometry in the system. You’ll have to pick through the code to figure out exactly what you need, which may be a little confusing, but it should make sense after you get it sorted out.
thanks i look that 
ok, i understand how to add a collision box to my cube, but i don’t understand how to detect collision evenement.
Code for my cube :
// COLLISION
private com.xith3d.collider.CollisionSystem cs;
private com.xith3d.collider.ColliderNode sphereColliderNode;
private com.xith3d.collider.ColliderNode blockColliderNode;
…
public Engine(){
…
// Collision
cs = new com.xith3d.collider.CollisionSystem(-1);
…
public void addBlock(String fileName,float x, float y, float z){
// Creer Cube
// Chargement des textures, Si pas de texture erreur
textureCube = (com.xith3d.scenegraph.Texture2D)tl.getMinMapTexture(“model/”+fileName);
com.xith3d.scenegraph.Geometry geotmp = createCubeViaTriangles(x, y, z, 1);
com.xith3d.scenegraph.Appearance a = new com.xith3d.scenegraph.Appearance();
a.setTexture(textureCube);
com.xith3d.scenegraph.Shape3D shtmp = new com.xith3d.scenegraph.Shape3D(geotmp, a);
objRotate.addChild(shtmp);
// COLLISION
shtmp.setName("cube_"+x+"_"+y+"_"+z);
com.xith3d.collider.ColliderGeometry cg = new com.xith3d.collider.ColliderGeometry();
cg.setModel(shtmp);
com.xith3d.collider.BiTreeCollider bic = new com.xith3d.collider.BiTreeCollider();
bic.build(cg);
blockColliderNode = new com.xith3d.collider.ColliderNode(shtmp,com.xith3d.collider.ColliderNode.CT_GEOMETRY,com.xith3d.collider.ColliderNode.CT_GEOMETRY,false,bic);
cs.addCollider(blockColliderNode);
}
} // end engine
I think my cube have now a box collision?
Can i make the same for the Camera com.xith3d.scenegraph.View() ?
Thanks !
I look odejava, that realy good !
I tested ,and work fine.
Just more clipping in render mode, the render it’s very slow.
Their a config to perform render?