# I want the box to be fixed to the floor and rotate

**URL:** <https://forum.babylonjs.com/t/i-want-the-box-to-be-fixed-to-the-floor-and-rotate/50460>\
**Category:** Questions\
**Tags:** physics\
**Created:** [May 11, 2024, 3:44am UTC](https://forum.babylonjs.com/t/i-want-the-box-to-be-fixed-to-the-floor-and-rotate/50460 "2024-05-11T03:44:07Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![jaywoow](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/jaywoow/32/39643_2.png) [@jaywoow](https://forum.babylonjs.com/u/jaywoow)\
**Post date:** [May 11, 2024, 3:44am UTC](https://forum.babylonjs.com/t/i-want-the-box-to-be-fixed-to-the-floor-and-rotate/50460/1 "2024-05-11T03:44:07Z")

</div>

I want to use the physical method setAngularVelocity to rotate the box, but it will slowly deviate from its original position. Which constraint method should I use to constrain it to be fixed to the floor?  
Hinge?  
6 Degrees Of Freedom?  
Slider?  
I can’t seem to understand their parameters~

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

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [May 12, 2024, 12:55pm UTC](https://forum.babylonjs.com/t/i-want-the-box-to-be-fixed-to-the-floor-and-rotate/50460/2 "2024-05-12T12:55:34Z")

</div>

cc @Cedric, but it does not seem to deviate from its original position when I test your PG(?)

---

<div class="post-metadata">

**Author:** ![jaywoow](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/jaywoow/32/39643_2.png) [@jaywoow](https://forum.babylonjs.com/u/jaywoow)\
**Post date:** [May 13, 2024, 1:59am UTC](https://forum.babylonjs.com/t/i-want-the-box-to-be-fixed-to-the-floor-and-rotate/50460/3 "2024-05-13T01:59:00Z")

</div>

If there is a slight slope it will deviate

---

<div class="post-metadata">

**Author:** ![11128](https://avatars.discourse-cdn.com/v4/letter/1/d07c76/32.png) [@11128](https://forum.babylonjs.com/u/11128)\
**Post date:** [May 13, 2024, 2:34am UTC](https://forum.babylonjs.com/t/i-want-the-box-to-be-fixed-to-the-floor-and-rotate/50460/4 "2024-05-13T02:34:57Z")

</div>

Do you want to keep the position from moving when rotating?

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

---

<div class="post-metadata">

**Author:** ![jaywoow](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/jaywoow/32/39643_2.png) [@jaywoow](https://forum.babylonjs.com/u/jaywoow)\
**Post date:** [May 13, 2024, 3:47am UTC](https://forum.babylonjs.com/t/i-want-the-box-to-be-fixed-to-the-floor-and-rotate/50460/5 "2024-05-13T03:47:35Z")

</div>

Yeah, so I need a hinge constraint to connect it to the floor.

---

<div class="post-metadata">

**Author:** ![jaywoow](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/jaywoow/32/39643_2.png) [@jaywoow](https://forum.babylonjs.com/u/jaywoow)\
**Post date:** [May 13, 2024, 3:48am UTC](https://forum.babylonjs.com/t/i-want-the-box-to-be-fixed-to-the-floor-and-rotate/50460/6 "2024-05-13T03:48:56Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![11128](https://avatars.discourse-cdn.com/v4/letter/1/d07c76/32.png) [@11128](https://forum.babylonjs.com/u/11128)\
**Post date:** [May 13, 2024, 4:13am UTC](https://forum.babylonjs.com/t/i-want-the-box-to-be-fixed-to-the-floor-and-rotate/50460/7 "2024-05-13T04:13:16Z")

</div>

hinge

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

---

<div class="post-metadata">

**Author:** ![jaywoow](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/jaywoow/32/39643_2.png) [@jaywoow](https://forum.babylonjs.com/u/jaywoow)\
**Post date:** [May 13, 2024, 5:40am UTC](https://forum.babylonjs.com/t/i-want-the-box-to-be-fixed-to-the-floor-and-rotate/50460/9 "2024-05-13T05:40:06Z")

</div>

Thai cool spicy！ 😀
