hey I’ve got this code to move around my ‘player’ but the movement doesn’t feel precise … it feels slippery
any solutions to fix this in a decent way(mainly through code) ? Any help is much appreciated
// right now it adds force every frame to the object’s rigidbody until the object reaches the max speed
//this is left and right movement
// _movespeed is 35f and _maxspeed is also 35f
void Update () {
if(_rigid.velocity.magnitude < _maxspeed)
{
if(Input.GetKey(“d”))
{
_input = new Vector3(1f,0f,0f);
_rigid.AddForce(_input*_movespeed);
Debug.Log(_input);
}
if(Input.GetKey(“q”))
{
_input = new Vector3(-1*1f,0f,0f);
_rigid.AddForce(_input*_movespeed);
Debug.Log(_input);
}
}
}