Player falls through ground

I followed the fps movement tutorial but my player keeps falling through the ground. Please help.
https://playcanvas.com/editor/scene/771340

The plane doesn’t have a rigid body

1 Like

I added it but now my player doesnt move

And it cant even look around…

Look at the first person movement tutorial. That should help out.

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

The player in this tutorial has a rigid body and works perfectly on a static ground.

Press the parse button on the script. After you have done this, it will show you some parameters that you can tweak:

image

image

lookSpeed changes the sensitivity of the mouse and power changes the movement speed.

Please check the first person tutorial project for other changes that you may need to make in your scene.

I added the rigid body to the floor and parced the code… but the player still can’t move and when i attached the camera to the player, it still did not move

i also made the floor dynamic and it now pushes the player up without coming down

Check the amount of power being used. Increase it and see if anything changes. Also make sure all the linear factor values are set to 1.

any tips on how to make the player only look left right and up? i dont need them to look down
also, the cam does not follow the player

You need to set the camera as a child of the player for it to follow it.

Make the camera a child or the player a child?

also the player cant move forward

Make the camera a child. Also have you tried what I told you to do?

yes

It could help to spawn a character slightly “floating” above the ground. I always got some weird physics bugs in Unity when my dynamic objects are touching the ground at the game session start. Not sure about Playcanvas, though.

Never had much issues like that in Unity