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

**URL:** <https://forum.castle-engine.io/t/teaser-physics-joints-in-castle-game-engine-hinge-ball-grab-rope/655>\
**Category:** News\
**Created:** [October 7, 2022, 9:46pm UTC](https://forum.castle-engine.io/t/teaser-physics-joints-in-castle-game-engine-hinge-ball-grab-rope/655 "2022-10-07T21:46:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![michalis](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/michalis/32/3_2.png) [@michalis](https://forum.castle-engine.io/u/michalis)\
**Post date:** [October 7, 2022, 9:46pm UTC](https://forum.castle-engine.io/t/teaser-physics-joints-in-castle-game-engine-hinge-ball-grab-rope/655/1 "2022-10-07T21:46:16Z")

</div>

A quick video demonstrating new _Castle Game Engine_ physics joints!

Joints presented:

- 

- 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](https://github.com/castle-engine/castle-engine/tree/physics_j).

_Andrzej Kilijański_ and _Michalis Kamburelis_ work on making it merged to CGE master 🙂 If you like this work, [please support us](https://www.patreon.com/castleengine).

We use physics engine [Kraft](https://github.com/BeRo1985/kraft/) for the underlying computation by [Benjamin ‘BeRo’ Rosseaux](https://www.patreon.com/bero).

---

<div class="post-metadata">

**Author:** ![AveryCTF](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/averyctf/32/958_2.png) [@AveryCTF](https://forum.castle-engine.io/u/AveryCTF)\
**Post date:** [October 12, 2022, 7:58pm UTC](https://forum.castle-engine.io/t/teaser-physics-joints-in-castle-game-engine-hinge-ball-grab-rope/655/2 "2022-10-12T19:58:28Z")

</div>

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)?

---

<div class="post-metadata">

**Author:** ![michalis](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/michalis/32/3_2.png) [@michalis](https://forum.castle-engine.io/u/michalis)\
**Post date:** [October 13, 2022, 8:48pm UTC](https://forum.castle-engine.io/t/teaser-physics-joints-in-castle-game-engine-hinge-ball-grab-rope/655/3 "2022-10-13T20:48:13Z")

</div>

> [@AveryCTF](#):
>
> Do they have properties such as springy-ness/bouncyness,

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

> [@AveryCTF](#):
>
> and tension limits (such as to make them break under excessive force)?

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

> [@AveryCTF](#):
>
> 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)?

Hm, good idea and I don’t know 🙂 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.

---

<div class="post-metadata">

**Author:** ![AveryCTF](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/averyctf/32/958_2.png) [@AveryCTF](https://forum.castle-engine.io/u/AveryCTF)\
**Post date:** [October 14, 2022, 12:54am UTC](https://forum.castle-engine.io/t/teaser-physics-joints-in-castle-game-engine-hinge-ball-grab-rope/655/4 "2022-10-14T00:54:19Z")

</div>

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.
