I’ve been working with the “new” Character Physics Controllers and ran into somewhat of a limitation. In games such as Counter Strike and other source games, you can redirect movement with the A/D keys to strafe left and right while the w key is released. To the contrary, with the physics controller, pressing any movement key overrides the velocity vector and ends up slowing you down to send you in that direction, overriding any previous forward momentum. This even happens when holding ‘W’ while moving faster than the base movement speed, slowing you down instead of, in a perfect world, having no effect.
Is there some way to manage this behavior? I might make a feature request otherwise.
These new controllers are nice and I’ve enjoyed working with them. It would be a shame to have to end up creating my own controller.
I’m not sure how well I explained this, so tell me if I need to clarify anything.
Summary: Moving overrides already existing momentum instead of adding on to it.
Friction is checked regardless if you are moving or not. In that example, there was negligible friction. The issue here is that BaseMoveSpeed basically just sets your speed instead of either adding to it or having no effect, based on the direction of the vector. If I were to be moving at the speed in my example and were to, lets say, hold D, It would redirect the vector from {-200, 0, 0} to {0, 0, -20} (20 being my BaseMoveSpeed) instead of maintaining the speed and just adding to the vector3 {-200, 0, -20}. BaseMoveSpeed is basically just a flat value that the characters assemblyLinearVelocity is set to
(which I would like to be able to manage in some way)
There’s not really a way to directly configure how these movement forces and movement inputs affect the player. To me it seems like they are just directly tweening the assemblylinearvelocity, but I’m not really sure. If anyone knows how these things work, let me know.
If anyone has this issue, your better off just scripting your own air controller. It works fine, and you can still use the ground controller normally. Just set the active controller to nil while airborne, and simply do the air movement with a vector force. You’ll have to keep the player upright in some other way as well. I just used an align orientation.