Need help in blender

Started by abhi13feb, April 23, 2008, 01:31:54 PM

Previous topic - Next topic

abhi13feb

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

fireside

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);
click here->Fireside 7 Games<-

abhi13feb

hey but in JPCTDemo example nothing of this sort has been done....??

fireside

#3
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.
click here->Fireside 7 Games<-

abhi13feb

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....

fireside

#5
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.
click here->Fireside 7 Games<-

EgonOlsen

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 to a higher value and see if that helps.