www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: abhi13feb on April 23, 2008, 01:31:54 pm

Title: Need help in blender
Post by: abhi13feb on April 23, 2008, 01:31:54 pm
Hey..I have created a .3ds model in Blender and exported it to JPCTDemo example.Everything is fine except during walkthrough its crossing the wall as if there is no wall....:(...plz help me out..its reallly critical
Title: Re: Need help in blender
Post by: fireside on April 23, 2008, 03:03:12 pm
That's not Blender.  You have to set the object to:
object.setCollisionMode(Object3D.COLLISION_CHECK_SELF);

and the rest of the world to:

object.setCollisionMode(Object3D.COLLISION_CHECK_OTHERS);
Title: Re: Need help in blender
Post by: abhi13feb on April 23, 2008, 03:15:36 pm
hey but in JPCTDemo example nothing of this sort has been done....??
Title: Re: Need help in blender
Post by: fireside on April 23, 2008, 03:31:13 pm
It's been done for the world.  It's kind of an automatic thing for the camera, I think.  I haven't used that much.

No, I think it's set up for the camera, too.  You set up ellipsoid collision even after you do the settings above.  It should be there, just check it out really close.  Basically, you give it a size with the simplevector object and then test it once every game loop.  It should be in the move function.  You get a z direction from the object, add a little to it with a vector, and then test it with collision.  It either stops or moves forward.
Title: Re: Need help in blender
Post by: abhi13feb on April 23, 2008, 03:50:05 pm
Thats the main point of confusion...the same piec of code JPCTDEMOis working fine for any .3ds model from 3ds max...but its not working for the models developed in BLENDER....
Title: Re: Need help in blender
Post by: fireside on April 23, 2008, 04:10:22 pm
I develop with Blender and don't have any problem with collision.   Triangulation may help, since Blender normally develops with quads.  Select your model and go into edit mode, select all the verices with "a" and then press control + "t" and it will make the quads into triangles.
Title: Re: Need help in blender
Post by: EgonOlsen on April 23, 2008, 04:48:45 pm
Maybe the polygon is too large to be processed by the collision detection in your current config. Try to set http://www.jpct.net/doc/com/threed/jpct/Config.html#collideOffset (http://www.jpct.net/doc/com/threed/jpct/Config.html#collideOffset) to a higher value and see if that helps.