Bugs in the First Person Shooter Starter Kit?

I think there may be bugs in The First Person Shooter Starter Kit (https://developer.playcanvas.com/en/tutorials/first-person-shooter-starter-kit/).

  1. If the player stops partway up the stairs they will slowly roll back.
  2. Also the movement controls (forward, back, strafe) can randomly (and permanently) freeze while moving up and down the stairs.

I’m trying to debug it, but making little progress.
Any pointers, ideas or fixes?

Quite frankly, our FPS project could use an update as it’s a very basic controller.

  1. It’s sliding on the stairs because the capsule end is round and gravity is basically pulling the player off the end of the step. A quick fix would be to check if the player is on the ground and if there is no input, zero out velocity. That would kill momentum when moving so you may need so adjustment depending on what type of FPS movement you would like.

  2. That’s more of a collision mesh issue where it looks like it is getting stuck on the stairs edge? The model would need adjusting probably here

That pretty much confirms both of my suspicions. :thinking:
Sadly, I’m not sufficiently familiar with the code and physics implementation to tackle the issues. :frowning_face:
At least, not yet. :slightly_smiling_face:

Can you try increasing the friction on both the player and the level bodies?

It may help with that.

  1. It looks like the code already does that. I guess it’s being overridden by the physics engine?

I don’t see it zeroing out the velocity when there’s no input

tmp is set to Vec3(0) and applied when direction.length is 0. (Assuming direction == (0,0,0) equates to no input.)

So it does :thinking:

Would have thought that setting the linear velocity would have prevent the simulation applying gravity in the sim step but it doesn’t :thinking:

I don’t have an immediate good answers here beyond apply gravity on a per object basis rather than global so the character controller has full control over when gravity is applied (ie when not grounded)

At least, I’m not going crazy! :crazy_face: :clown_face: