Teaser: Physics joints in Castle Game Engine: hinge, ball, grab, rope

Posted on

A quick video demonstrating new Castle Game Engine physics joints!

Joints presented:

  • hinge (rotation around an axis)

  • ball (free rotation)

  • grab (follow a specified point)

  • rope (one object is tied to another with an invisible rope – it can move and rotate, as long as the rope distance is preserved).

We can design and simulate everything in CGE editor. This is all open-source, on Castle Game Engine physics_j branch.

Andrzej Kilijański and Michalis Kamburelis work on making it merged to CGE master 🙂 If you like this work, please support us.

We use physics engine Kraft for the underlying computation by Benjamin ‘BeRo’ Rosseaux.

Notable Replies

  1. This aught to make ragdolls very easy to set up. Do they have properties such as springy-ness/bouncyness, and tension limits (such as to make them break under excessive force)? And, can the rope joint lock rotation of it’s length axis (like to only rotate perpendicular to it’s length, but not along the length)?

  2. The grab and distance joints have DampingRatio and FrequencyHz to control such thing.

    I am not yet convinced whether these names are best :), maybe we should expose them under different names / through a bit different numbers.

    But the use-case is indeed to control “how flexible is the invisible spring behind it”.

    Yes, there is BreakThresholdForce / BreakThresholdTorque. You can control how easy / hard is it to break the joint.

    Hm, good idea and I don’t know :slight_smile: We have there LockRotation, but this works in global coordinates, so it will not allow exactly what you describe. I’ll ask Andrzej Kilijański to comment more about whether it is (or could be, in the future) possible.

  3. Sounds good!

    What I have in mind for controlling the rotation of the rope type is that it would make a perfect ragdoll hip-joint, shoulder-joint, or spine joint if it can be constrained to not spin around too much. It could make the ragdoll hierarchy probably as simple as a bunch of rope joints + a hinge for each elbow/knee.

Continue the discussion at Castle Game Engine Forum

Participants

Avatar for AveryCTF Avatar for michalis