Hi, im making a game that uses physics for everything, and i need a character controller. the character controllers ive tried with rigidbody.velocity seem to not work with hinges. So ive resorted to using addforce. it works fine, but the character seeems to slide around a lot. is there a way to apply countermovment when i stop pressing a movment button?
Code
if (Input.GetKey(KeyCode.W))
{
playerBody.AddForce(transform.forward * movSpeed);
}
if (Input.GetKey(KeyCode.D))
{
playerBody.AddForce(transform.right * movSpeed);
}
if (Input.GetKey(KeyCode.S))
{
playerBody.AddForce(transform.forward * -1 * movSpeed);
}
if (Input.GetKey(KeyCode.A))
{
playerBody.AddForce(transform.right * -1 * movSpeed);
}