# \#movewithcollisions

**URL:** https://forum.babylonjs.com/tag/movewithcollisions/340.md

[Latest](https://forum.babylonjs.com/latest.md) · [Categories](https://forum.babylonjs.com/categories.md) · [Tags](https://forum.babylonjs.com/tags.md)

---

## [In the same environment.,the blue box shifts upward while moving forward, and the yellow box stops when it reaches the edge of the ground](https://forum.babylonjs.com/t/in-the-same-environment-the-blue-box-shifts-upward-while-moving-forward-and-the-yellow-box-stops-when-it-reaches-the-edge-of-the-ground/63586)

<div class="topic-metadata">

**Author:** [@Yasinli29](https://forum.babylonjs.com/u/Yasinli29)\
**Replies:** 1\
**Last updated:** [June 3, 2026, 10:19pm UTC](https://forum.babylonjs.com/t/in-the-same-environment-the-blue-box-shifts-upward-while-moving-forward-and-the-yellow-box-stops-when-it-reaches-the-edge-of-the-ground/63586 "2026-06-03T22:19:17Z")

</div>

In the same environment.,the blue box shifts upward while moving forward, and the yellow box stops when it reaches the edge of the ground Babylon.js Playground - #BZ92LQ

---

## [Capsule floating above ground when using moveWithCollisions and gravity in Babylon.js](https://forum.babylonjs.com/t/capsule-floating-above-ground-when-using-movewithcollisions-and-gravity-in-babylon-js/63292)

<div class="topic-metadata">

**Author:** [@codewaters](https://forum.babylonjs.com/u/codewaters)\
**Replies:** 3\
**Last updated:** [April 29, 2026, 5:29pm UTC](https://forum.babylonjs.com/t/capsule-floating-above-ground-when-using-movewithcollisions-and-gravity-in-babylon-js/63292 "2026-04-29T17:29:11Z")

</div>

Hi everyone, I’m new to Babylon.js and have been stuck on an issue for quite some time. I’d really appreciate any guidance you can offer. What I’m trying to achieve is fairly straightforward: I have a capsule that shoul…

---

## [How to make two chracter controllers collide with each other?](https://forum.babylonjs.com/t/how-to-make-two-chracter-controllers-collide-with-each-other/59549)

<div class="topic-metadata">

**Author:** [@scherka](https://forum.babylonjs.com/u/scherka)\
**Replies:** 7\
**Last updated:** [November 28, 2025, 3:53pm UTC](https://forum.babylonjs.com/t/how-to-make-two-chracter-controllers-collide-with-each-other/59549 "2025-11-28T15:53:18Z")

</div>

Hello! I have two character controllers: one for the player and one for the NPC. However, controllers collide with everything but each other and the player can walk through NPCs. Is there any way to make them collide?

---

## [Pressing 'down' or 'up' has mesh go 'up' either way + ground collision appears to be prematurely detected](https://forum.babylonjs.com/t/pressing-down-or-up-has-mesh-go-up-either-way-ground-collision-appears-to-be-prematurely-detected/58710)

<div class="topic-metadata">

**Author:** [@basttran](https://forum.babylonjs.com/u/basttran)\
**Replies:** 2\
**Last updated:** [May 29, 2025, 2:48pm UTC](https://forum.babylonjs.com/t/pressing-down-or-up-has-mesh-go-up-either-way-ground-collision-appears-to-be-prematurely-detected/58710 "2025-05-29T14:48:25Z")

</div>

Hello :smiley: :waving\_hand: , While trying to implement a character controller based on movewithCollisions I’m having troubles having my controlled mesh properly moving up and down, along the scene’s Y axis. I have no…

---

## [If there are multiple colliders, which mesh becomes \`collidedMesh\`?](https://forum.babylonjs.com/t/if-there-are-multiple-colliders-which-mesh-becomes-collidedmesh/56823)

<div class="topic-metadata">

**Author:** [@alekop](https://forum.babylonjs.com/u/alekop)\
**Replies:** 11\
**Last updated:** [May 28, 2025, 3:55am UTC](https://forum.babylonjs.com/t/if-there-are-multiple-colliders-which-mesh-becomes-collidedmesh/56823 "2025-05-28T03:55:01Z")

</div>

I have a bug (which I can’t replicate in a PG) where the player’s mesh.collider.collidedMesh.name is always “floor”, even when it also collides with a “wall”. The logic is pretty basic: let disp = mesh.calcMovePOV(0, GR…

---

## [\[SOLVED\] Multiple calls to "moveWithCollisions" in one frame breaks on the second call](https://forum.babylonjs.com/t/solved-multiple-calls-to-movewithcollisions-in-one-frame-breaks-on-the-second-call/58471)

<div class="topic-metadata">

**Author:** [@violgamba](https://forum.babylonjs.com/u/violgamba)\
**Replies:** 4\
**Last updated:** [May 19, 2025, 4:08pm UTC](https://forum.babylonjs.com/t/solved-multiple-calls-to-movewithcollisions-in-one-frame-breaks-on-the-second-call/58471 "2025-05-19T16:08:56Z")

</div>

It seems that the moveWithCollisions method works with the position of the mesh at the start of the frame, rather than at the time of the call to it. Calling moveWithCollisions twice in one frame causes the second call …

---

## [\[implemented\] Suggestion: moveWithCollisions() - option for no sliding](https://forum.babylonjs.com/t/implemented-suggestion-movewithcollisions-option-for-no-sliding/58288)

<div class="topic-metadata">

**Author:** [@violgamba](https://forum.babylonjs.com/u/violgamba)\
**Replies:** 10\
**Last updated:** [May 16, 2025, 11:01pm UTC](https://forum.babylonjs.com/t/implemented-suggestion-movewithcollisions-option-for-no-sliding/58288 "2025-05-16T23:01:54Z")

</div>

I am encountering an issue that seems fairly common, based on what I’m reading in the forums. “moveWithCollisions()” handles collisions by projecting the movement vector onto the collided surface, causing sliding along …

---

## [Playground - Basic character-controller - stands still on sloped ground](https://forum.babylonjs.com/t/playground-basic-character-controller-stands-still-on-sloped-ground/58482)

<div class="topic-metadata">

**Author:** [@violgamba](https://forum.babylonjs.com/u/violgamba)\
**Replies:** 0\
**Last updated:** [May 16, 2025, 10:59pm UTC](https://forum.babylonjs.com/t/playground-basic-character-controller-stands-still-on-sloped-ground/58482 "2025-05-16T22:59:33Z")

</div>

The moveWithCollisions() method of meshes now includes an optional parameter, slideOnCollide, to stop movement at the first collision, instead of sliding along it. This is useful for a character controller that handles …

---

## [Is there any point in using ellipsoids for Instances in terms of performance?](https://forum.babylonjs.com/t/is-there-any-point-in-using-ellipsoids-for-instances-in-terms-of-performance/55908)

<div class="topic-metadata">

**Author:** [@Lemcat](https://forum.babylonjs.com/u/Lemcat)\
**Replies:** 3\
**Last updated:** [January 13, 2025, 11:55pm UTC](https://forum.babylonjs.com/t/is-there-any-point-in-using-ellipsoids-for-instances-in-terms-of-performance/55908 "2025-01-13T23:55:36Z")

</div>

I have an idea to make regular instances for all my game objects including movable objects even those, that will move with moveWithCollisions. Is it a good idea to move ellipsoids of Instances or they are not made for su…

---

## [Moving a hollow container with meshes inside with enabled physics](https://forum.babylonjs.com/t/moving-a-hollow-container-with-meshes-inside-with-enabled-physics/52068)

<div class="topic-metadata">

**Author:** [@HiGreg](https://forum.babylonjs.com/u/HiGreg)\
**Replies:** 3\
**Last updated:** [July 15, 2024, 3:58pm UTC](https://forum.babylonjs.com/t/moving-a-hollow-container-with-meshes-inside-with-enabled-physics/52068 "2024-07-15T15:58:09Z")

</div>

I have a hollow cube containing an unconnected cube inside it. With physics enabled, moving the container just teleports it so the smaller cube (remaining where it is) then becomes outside the container. I played aro…

---

## [Incorrect number of triangle points on collision \_testTriangle](https://forum.babylonjs.com/t/incorrect-number-of-triangle-points-on-collision-testtriangle/51108)

<div class="topic-metadata">

**Author:** [@Caner](https://forum.babylonjs.com/u/Caner)\
**Replies:** 6\
**Last updated:** [June 6, 2024, 4:08pm UTC](https://forum.babylonjs.com/t/incorrect-number-of-triangle-points-on-collision-testtriangle/51108 "2024-06-06T16:08:03Z")

</div>

Hello everyone! I have a 3D model that gives an error on collision. Here is the PG Link: https://playground.babylonjs.com/#KQT1V0#2 I could debug that in AbstractMesh.\_collideForSubMesh, one submesh had 5 vertices. The…

---

## [Vector3 movement not working for me](https://forum.babylonjs.com/t/vector3-movement-not-working-for-me/46839)

<div class="topic-metadata">

**Author:** [@Mhmod](https://forum.babylonjs.com/u/Mhmod)\
**Replies:** 12\
**Last updated:** [January 3, 2024, 6:50pm UTC](https://forum.babylonjs.com/t/vector3-movement-not-working-for-me/46839 "2024-01-03T18:50:11Z")

</div>

I have this code that moves the player (a cube mesh) depending on the key pressed, heres a simplified version: notes: moveDir is a Vector3 moveDir.addInPlaceFromFloats(-1 \* engine.getDeltaTime(), 0, 0); moveDir.normal…

---

## [Collisions on Flipped Normals](https://forum.babylonjs.com/t/collisions-on-flipped-normals/42844)

<div class="topic-metadata">

**Author:** [@Caner](https://forum.babylonjs.com/u/Caner)\
**Replies:** 14\
**Last updated:** [September 5, 2023, 11:00pm UTC](https://forum.babylonjs.com/t/collisions-on-flipped-normals/42844 "2023-09-05T23:00:19Z")

</div>

Greetings! I am facing some unwanted collision behavior in some scenes. Such as being pulled in into a mesh and being stuck around a mesh. Here is the PG link to an example scene Babylon.js Playground You can use WASD …

---

## [What would be the best way/proper way od moving a sprite from A to B?](https://forum.babylonjs.com/t/what-would-be-the-best-way-proper-way-od-moving-a-sprite-from-a-to-b/43733)

<div class="topic-metadata">

**Author:** [@Nagatori](https://forum.babylonjs.com/u/Nagatori)\
**Replies:** 1\
**Last updated:** [September 1, 2023, 10:48am UTC](https://forum.babylonjs.com/t/what-would-be-the-best-way-proper-way-od-moving-a-sprite-from-a-to-b/43733 "2023-09-01T10:48:33Z")

</div>

I have a game with runLoop on engine… And I was wondering how people here so the move animation usually. In unity I usually did that in the update fps loop with usage of the delta time and stuff. How is it done here usu…

---

## [Need to enable collision without enabling physics impostor](https://forum.babylonjs.com/t/need-to-enable-collision-without-enabling-physics-impostor/43694)

<div class="topic-metadata">

**Author:** [@madhumitha](https://forum.babylonjs.com/u/madhumitha)\
**Replies:** 2\
**Last updated:** [September 1, 2023, 9:49am UTC](https://forum.babylonjs.com/t/need-to-enable-collision-without-enabling-physics-impostor/43694 "2023-09-01T09:49:21Z")

</div>

I need to implement the collision for the entire scene and if I dont want collision for a particular mesh I should be able to diable collision.But when I Implement collision its not working without enabling physics(phys…

---

## [FreeCamera-UniversalCamera FPS movement behaviour](https://forum.babylonjs.com/t/freecamera-universalcamera-fps-movement-behaviour/42909)

<div class="topic-metadata">

**Author:** [@Juancode](https://forum.babylonjs.com/u/Juancode)\
**Replies:** 1\
**Last updated:** [August 4, 2023, 4:35pm UTC](https://forum.babylonjs.com/t/freecamera-universalcamera-fps-movement-behaviour/42909 "2023-08-04T16:35:23Z")

</div>

Hi guys I just wanted to know how do you achieve the universal camera behaviour shown on this examples : Babylon.js - The Car demo Babylon.js - Heart demo you know , like a first person shooter experience , you have t…

---

## [ArcRotateCamera is sliding on collisions](https://forum.babylonjs.com/t/arcrotatecamera-is-sliding-on-collisions/42299)

<div class="topic-metadata">

**Author:** [@Danim](https://forum.babylonjs.com/u/Danim)\
**Replies:** 4\
**Last updated:** [July 11, 2023, 7:39am UTC](https://forum.babylonjs.com/t/arcrotatecamera-is-sliding-on-collisions/42299 "2023-07-11T07:39:06Z")

</div>

Hi, I’m trying to set up collisions to the ArcRotateCamera so the user can’t move it through some meshes, but I’m facing an issue, as the camera slides forward when it collides with the floor and the user continues drag…

---

## [Simple Demo Mini Tutorial for "Newbies" - Player moving (MoveWithCollisions)](https://forum.babylonjs.com/t/simple-demo-mini-tutorial-for-newbies-player-moving-movewithcollisions/40764)

<div class="topic-metadata">

**Author:** [@DRLeria](https://forum.babylonjs.com/u/DRLeria)\
**Replies:** 15\
**Last updated:** [May 21, 2023, 9:46am UTC](https://forum.babylonjs.com/t/simple-demo-mini-tutorial-for-newbies-player-moving-movewithcollisions/40764 "2023-05-21T09:46:28Z")

</div>

Good afternoon Group! Here I leave the download link of a simple project. LIVE DEMO https://www.viseni.com/character\_navigation/ SOURCE CODE DOWNLOAD LINK – UPDATED TO GITHUB Basically it is to learn how to use a n…
