# Havok, bodies without rotation, angular velocity

**URL:** <https://forum.babylonjs.com/t/havok-bodies-without-rotation-angular-velocity/46094>\
**Category:** Questions\
**Tags:** havok\
**Created:** [December 1, 2023, 3:40pm UTC](https://forum.babylonjs.com/t/havok-bodies-without-rotation-angular-velocity/46094 "2023-12-01T15:40:13Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![yamaciller](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/yamaciller/32/21810_2.png) [@yamaciller](https://forum.babylonjs.com/u/yamaciller)\
**Post date:** [December 1, 2023, 3:40pm UTC](https://forum.babylonjs.com/t/havok-bodies-without-rotation-angular-velocity/46094/1 "2023-12-01T15:40:13Z")

</div>

Is it possible to create Havok bodies, which just “slide”.  
So the idea is to have a physical body which does not tip over, but stays straight up.

> **[Babylon.js Playground](https://playground.babylonjs.com/#GYS1K8%2326)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

Setting the velocity and damping does work but not well over time.

Or a more broader Question would be, Does Havok provide “Collision only” bodies, which can be assigned to a geometry? Well I read about body types and none of the three (static, dynamic, animated) would suit, isnt it?

The idea to design an object could also work like this (see PG below), but I would need some collision objects, which I can attach to the geometry.

> **[Babylon.js Playground](https://playground.babylonjs.com/#GYS1K8%2323)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

Use the Arrow Keys to Move the pink body.

Best.  
Werner

---

<div class="post-metadata">

**Author:** ![Cedric](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/cedric/32/2742_2.png) [@Cedric](https://forum.babylonjs.com/u/Cedric)\
**Post date:** [December 1, 2023, 4:22pm UTC](https://forum.babylonjs.com/t/havok-bodies-without-rotation-angular-velocity/46094/2 "2023-12-01T16:22:37Z")

</div>

I’m refering to the doc: [Physics V2 core concepts | Babylon.js Documentation](https://doc.babylonjs.com/features/featuresDeepDive/physics/rigidBodies#motion-type)  
if your body is dynamic and compute its forces, then it’s dynamic.  
if it collides/push other body but you control its position/rotation, then it’s animated.  
if it doesn’t move at all, then it’s static.

To eliminate rotation/angular velocity, you can set angular velocity to 0, every frame.

---

<div class="post-metadata">

**Author:** ![yamaciller](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/yamaciller/32/21810_2.png) [@yamaciller](https://forum.babylonjs.com/u/yamaciller)\
**Post date:** [December 1, 2023, 4:29pm UTC](https://forum.babylonjs.com/t/havok-bodies-without-rotation-angular-velocity/46094/3 "2023-12-01T16:29:29Z")

</div>

Thx. Yes re. bodies.  
I set the angular to 0 but that doesnt work.

---

<div class="post-metadata">

**Author:** ![DavidP](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/davidp/32/45669_2.png) [@DavidP](https://forum.babylonjs.com/u/DavidP)\
**Post date:** [December 3, 2023, 5:44am UTC](https://forum.babylonjs.com/t/havok-bodies-without-rotation-angular-velocity/46094/4 "2023-12-03T05:44:32Z")

</div>

My guess would be to have a body that is hard to tip over. May be a rectangular box with a low height. Hopefully discrepancy between shape that you render and body that you use to simulate wont be too visible

---

<div class="post-metadata">

**Author:** ![yamaciller](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/yamaciller/32/21810_2.png) [@yamaciller](https://forum.babylonjs.com/u/yamaciller)\
**Post date:** [December 4, 2023, 10:48am UTC](https://forum.babylonjs.com/t/havok-bodies-without-rotation-angular-velocity/46094/5 "2023-12-04T10:48:43Z")

</div>

Hi.  
I was thinking of that as well, but generally it should be that diamond shape.  
Basically the diamond with that behavior is against the idea of using physics ;), I know.  
So maybe use a sphere…

Didnt try the Dynamic body yet, but I have a feeling that doesnt work either.  
best.w.

---

<div class="post-metadata">

**Author:** ![DavidP](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/davidp/32/45669_2.png) [@DavidP](https://forum.babylonjs.com/u/DavidP)\
**Post date:** [December 4, 2023, 4:53pm UTC](https://forum.babylonjs.com/t/havok-bodies-without-rotation-angular-velocity/46094/6 "2023-12-04T16:53:16Z")

</div>

I am thinking a cylinder with low height as body mesh might work better for you. Then Havoc can simulate behavior, similar to a hockey puck sliding on ice

---

<div class="post-metadata">

**Author:** ![yamaciller](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/yamaciller/32/21810_2.png) [@yamaciller](https://forum.babylonjs.com/u/yamaciller)\
**Post date:** [December 5, 2023, 3:33pm UTC](https://forum.babylonjs.com/t/havok-bodies-without-rotation-angular-velocity/46094/7 "2023-12-05T15:33:03Z")

</div>

But a puck wouldnt slide over slopes and tilt as well, wouldnt it?

---

<div class="post-metadata">

**Author:** ![eoin](https://avatars.discourse-cdn.com/v4/letter/e/f14d63/32.png) [@eoin](https://forum.babylonjs.com/u/eoin)\
**Post date:** [December 5, 2023, 5:22pm UTC](https://forum.babylonjs.com/t/havok-bodies-without-rotation-angular-velocity/46094/8 "2023-12-05T17:22:30Z")

</div>

If you give a body infinite inertia, the physics engine will be unable to rotate it, but it’ll otherwise behave physically:

node.physicsBody.setMassProperties( {inertia: new BABYLON.Vector3(0, 0, 0) } );

---

<div class="post-metadata">

**Author:** ![yamaciller](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/yamaciller/32/21810_2.png) [@yamaciller](https://forum.babylonjs.com/u/yamaciller)\
**Post date:** [December 6, 2023, 11:06am UTC](https://forum.babylonjs.com/t/havok-bodies-without-rotation-angular-velocity/46094/9 "2023-12-06T11:06:28Z")

</div>

Interesting.  
Will try that.  
Thx!  
Best. Werner

---

<div class="post-metadata">

**Author:** ![yamaciller](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/yamaciller/32/21810_2.png) [@yamaciller](https://forum.babylonjs.com/u/yamaciller)\
**Post date:** [December 6, 2023, 3:44pm UTC](https://forum.babylonjs.com/t/havok-bodies-without-rotation-angular-velocity/46094/10 "2023-12-06T15:44:22Z")

</div>

I have implemented this and with a compound body I get the desired result.

> **[Babylon.js Playground](https://playground.babylonjs.com/#GYS1K8%2348)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

**cursor** keys to move  
**v** for the physics body  
**space** for reset

Thank you!
