Open autobzooty opened 3 years ago
And it goes a little something like this:
function Update() { UpdateRequestedMoveDirection() UpdateSpeed() Move() ResolveCollision() }
Building from scratch to reduce complexity and to increase control.
This component will probably be called PlayerMover. It will require a capsule collider and an InputListener. Because we are handling our own collision, a RigidBody shouldn't be necessary.
After some experimenting and relearning how this works, I think we want a rigidbody after all. It will handle all of our collision for us in a generic way. However, we should only be using the rigidbody to set the player's velocity once per frame. There is a single authority on how the player should be moving, and it is the PlayerMover component. This will allow us to handle any special movement we want like sidling, bonking, etc.
Character movement system needs to be redone after Issue #2 is finished.