[SOLVED] Walls won't collide with player

I’m trying to make the walls stop the player, but they won’t collide with it. Could someone help? link: PlayCanvas | HTML5 Game Engine

Hi @Jacob_Cain and welcome,

Your scene setup is quite ok, the reason it isn’t working is because you are using entity.translateLocal() to move your player.

Since the player is a rigid body and part of the physics simulation you have to move it using:

  1. Forces/impulses
  2. Or by setting its linear/angular velocity directly

Here are two examples:

https://developer.playcanvas.com/en/tutorials/first-person-movement/

https://developer.playcanvas.com/en/tutorials/third-person-controller/

2 Likes

Ok, thanks!