27-02-2021, 09:15 AM
According to the example you provided, I wrote a demo that uses the mouse to move. At first, the demo is normal, but the later movement slowly turns into the opposite direction. Why?
if (Input.GetMouseButton(0))
{
direction += moveDirection* moveSpeed;
softbody.AddForce(direction.normalized * moveSpeed, ForceMode.Acceleration);
}
if (Input.GetMouseButton(0))
{
direction += moveDirection* moveSpeed;
softbody.AddForce(direction.normalized * moveSpeed, ForceMode.Acceleration);
}