Passes through the wall

So I’m new to PlayCanvas and coded a movement script for my player but the thing is that my player keeps on passing through the walls that I put around it.

The walls does have a collider and rigidbody that sets to static, does it need a code?

I came from using UNITY so this confuses me, please help.

Hi, and welcome!

The walls and other static objects normally do not need a code to function as colliders, unless you want to add some special function, like do some action when the wall is touched. So, it should work as is.

Make sure the collision component half extents are correct, as they are different from the model scale.

Also, Playcanvas doesn’t include a physics engine by default. Make sure you import Ammo from the project settings:

2 Likes

Well I did all of that but the issue is it still passes through walls, am I doing something wrong? or maybe the code to my movement is the wrong one here?

I’m using translateLocal and rotateLocal, so I’m thinking maybe that’s the issue?

Oh yeah, my movement script is the wrong one here.

sorry for the trouble

thanks.