Hey guys, getting a little bit of an issue with my player movement. It seems that whenever I move my character to the right or backwards, my player seems to slide. Even if it stop pressing buttons, it keeps moving. I am assuming it has something to do partially with the relation to the camera, but not too sure how to go about fixing it.
Here is the code handling the movement calculations:
void HandleMovement()
{
movementDirection = (cameraObject.right * movementInput[0]) + (cameraObject.forward * movementInput[1]);
movementDirection.Normalize();
//movementDirection.y = 0f;
//Note that movementVelocity = movementDirection * respective scalar (handled within state machine)
characterController.Move(movementVelocity * Time.deltaTime);
}
Here is a video link to what is happening: regallargebluemorphobutterfly