Question by
lvcoc · Aug 01, 2019 at 02:41 PM ·
rigidbodymove an object
Roll a ball like hamsterball gold
how can i roll a ball smoothly just like hamsterball gold did. and here is my code in FixedUpdate
input = new Vector3 (Input.GetAxis ("Mouse X"), 0, Input.GetAxis("Mouse Y"));
inputMagnitude = GetComponent<Rigidbody>().velocity.magnitude;
if (inputMagnitude < maxSpeed)
{
GetComponent<Rigidbody>().AddForce (input * moveSpeed,ForceMode.Impulse);
}
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612205849im_/https://answers.unity.com/themes/thub/images/avi.jpg)