Collision problem

How can I make my character won’t be able to pass the bricks? I already put collision and rigid body also added an invisible border so my character won’t be able to go overboard the scene but it doesn’t work

here’s my project link: Dacillo_ODMA1_Finals | Editor (playcanvas.com)

Hi @Miggy_Dacillo,

There is a number of issues with your character:

  1. Its rigid body is set to static, that won’t work with movable objects. It should either be dynamic or kinematic.

  2. If it’s a dynamic body you should be moving it by using forces or setting the velocity of its rigid body, instead of using entity.translate().

A good start on how to move an entity using physics is the following tutorial project. It’s first person, but the logic is similar:

https://developer.playcanvas.com/en/tutorials/

1 Like