public void UpdateVelocity(Vector3 direction, float deltaTime) { var smoothDampDataX = GetSmoothDampData(direction.x); var smoothDampDataZ = GetSmoothDampData(direction.z); velocity.SetY(-20.0f); velocity.SmoothDampUpdate(direction, smoothDampDataX, smoothDampDataZ, deltaTime); }
private void UpdateVelocity(Vector3 movementInput, float deltaTime) { var SmoothDampDataX = GetSmoothDampData(movementInput.x); var SmoothDampDataZ = GetSmoothDampData(movementInput.z); velocity.SetY(-20.0f); velocity.SmoothDampUpdate(movementInput, SmoothDampDataX, SmoothDampDataZ, deltaTime); }
private void UpdateVelocity(Vector3 movementInput, float deltaTime) { var smoothDampDataX = GetSmoothDampData(movementInput.x); var smoothDampDataZ = GetSmoothDampData(movementInput.z); velocity.AddY(controller.Gravity * deltaTime); velocity.SmoothDampUpdate(movementInput, smoothDampDataX, smoothDampDataZ, deltaTime); }