
It looks like you're new here. If you want to get involved, click one of these buttons!
3:20PM edited 3:31PM in Programming Flag
I've tried Adding Torque to rigid body, it works but not as perfect as in the video
Here is the example of using torque
float rotX = Input.GetAxis("Mouse X") * rotationSpeed * Mathf.Deg2Rad * Time.fixedDeltaTime; float rotY = Input.GetAxis("Mouse Y") * rotationSpeed * Mathf.Deg2Rad * Time.fixedDeltaTime; rb.AddTorque (Vector3.down * -rotX); rb.AddTorque (Vector3.right * rotY);
https://gist.github.com/aibekn/1a2a8acc7602f40ca6deb7cd4dc0c66e
Answers
I am not so sure but maybe try transform.rotate instead of rb.AddTorque?
It should work as the combination of this to functions. If you hold it should move with rotate functoin, if you swipe it should use torque. I have only one idea, just to hard code)))