Functionality beyond ODE

Tilmann edited this page Jul 20, 2015 · 3 revisions


ode4j contains some functionality that is not present in the original ODE.


ode4j has generic support for rag dolls (or any other entities made of multiple bodies connected with joints). The patch adds a new type of joint - DxJointConstrainedBall, it is an extension to the regular ball and socket joint and additionally provides a way to constrain the movement as described at It is useful to implement more realistic shoulders of a human rag doll for instance. DxRagdoll class builds the actual rag doll based on the given list of "bones" and "joints". Additionally it provides a simple autoDisable method that can be used to freeze the whole rag doll when the movement of the bodies is minimal. Usually rag doll bodies tend to oscillate due to the high number of hard constraints and disabling only some of them does not work. Additionally, there is a demo with an example of a humanoid rag doll based on the tutorial mentioned above. The demo is extremely simple, you can only press space to apply some force.

Heightfields with holes

ode4j enhances the functionality of the gimpact-based heightfield geom by adding simple support for holes and multiple layers. There is a corresponding demo showing 2 overlapping heightfields that look somewhat like a Swiss cheese. Moving bodies can fall through the holes and roll on both heightfields. The functionality is not very interesting on its own, but it allows to build complex environments including tunnels or caves (e.g. a pipe-like trimesh combined with a heightfield with 2 holes at the end of the tunnel) The code purposely enforces the rectangular shape of the holes to make it compatible with most of the rendering techniques. In order to keep the heightfield data API intact NaN value was chosen to denote a hole.

Bug fixes

Contacts sorting

This is related to issue #36 in ODE, but has not been fixed there. See also issue #22 in ode4j.

ode4j provides a flag that allows disabling the fix for compatibility reasons: OdeConfig.ENABLE_CONTACT_SORTING