Passing through static bodies

Hy guys, i`m trying to create a wall and a floor, but when i take my caracter and move in the direction of this walls and another objects, he’s passiing through, how can i block this “passing” ?

My guess (without seeing the project) is that the character has no rigid boy or there’s been an error in the setup or the character is being moved with setPosition rather than with forces which means that the graphical representation is being moved but not the rigid body.

1 Like

oh sorry, my project is is there a tutorial where i can see about rigid body ? thanks for the reply :smiley:

Try this on your console:'Root/Plane').setPosition(0,0,0);'Root/Plane').collision.enabled = true;'Root/Playbot').rigidbody.teleport(0,10,0);'Root/Playbot').rigidbody.bodyType = 'dynamic';'Root/Playbot').findByPath('Camera').lookAt('Root/Playbot').getPosition());

You will find playbot and ground collision correctly except the strange relative positions of playbot and it’s camera.

Keep collision and rigidbody components both be enabled on your entity, to get result expected.

If you want to know more about the first-person movement, refer to this tutorial.