Bounding box?

I was wondering whats the deal with model bounds? as you can see from screenshot ball appears to float above model. can I remove the bounds?or would that remove collision also?

also, I have a torus physics object in my scene that doesnet show a bounds at all but works like a physics object perfectly. can I do this with any shape(meaning odd shaped .obj models) or does it have to extend trimesh?

thanks in advance

ODE does not handle dynamic trimeshes correctly yet. That's why all moving objects must be approximated by ODE primitives. That's why jmephysics uses the boundings for physics collisions.

Your 'Deathbot' :slight_smile: could be approximated by a box on the left, another rotated box on the right for the chamfer. Probably another one for the bottom…

Unfortunately the current jmephysics does not support it directly. But you can try to construct the replacement with Spatials in a Node, create the DynamicPhysicsObject and then remove the replacement spatials to add the actual mesh to that same Node.

cool, Im gonna go with a rectangular 'Deathbot' for now until I can make a better model.

thx for fast reply this forum rules 8)

Jme already has the code to divide a mesh into small boxes, OBBTree. Per, perhaps you can use the code to from better ODE primitives. 

Badmi said:

Per, perhaps you can use the code to from better ODE primitives. 

Well, I don't think we should put down too much work on these kind of hacks now when Irrisor is revamping the system. I can see these things will work out themselves when we plug in a more stable engine (how's JODE going?).

JOODE seems to be progressing from everything I've seen.  I believe the expected first fully functional release is expected within the next couple of months.  That shouldn't be too hard to plug into the new jME-Physics API.



darkfrog

This is going to sound silly…

…I don't understand… I thought Javaode has triMesh support all there to be used? Why isn't it used in jme-physics?

There is support for dynamic Trimesh collision, but it simply does not work well. That's why jmephysics does not use it.

Hi Irrisor,

  If someone does have a piece of geometry which they want a closer approximation to the real faces for dynamic collisions, what would the right way be of doing this, I saw there was an option for the bounding type when importing a model to be 'obb', but this doesnt seem to change how tight the bounds are of the model for the physics representation.



Is there no automated way to do this?



Cheers


No, not that I know of :expressionless: