Collision between wall and moving entity not detected

I am trying to get an entity to move around a level to probe for empty spaces on the floor were I can spawn other entities. Right now it can probe for the floor but I am having trouble getting it to know if it is inside of a wall or not.

Here is the project

The expected behavior right now in the “test” scene would be for the cube tagged “sweeper” to stop right when it touches the larger wall cube, along with it writing in the console that it is touching a wall. Right now the cube just ignores the wall and goes to the end of the floor.

I attempted to add collision detection to both the wall and the sweeper cube but none are doing anything. Thanks!

Hi @eggs ! I looked at your code, you have the function for triggers, and the code for collisions. I recommend you check this out: Collision and Triggers | PlayCanvas Developer Site

thanks, I wasn’t reading the page closely enough so I forgot to set the rigid body of the moving cube to kinematic :face_with_open_eyes_and_hand_over_mouth:

1 Like