I have a object and I want to rotate it with touch. So I wrote this code: Code (CSharp): if(Input.GetTouch(0).phase == TouchPhase.Moved) { if (Input.GetTouch(0).deltaPosition.x > 0) { degrees -= 1f; if (gameObject.name == "Platform") { gameObject.transform.eulerAngles = new Vector3(degrees, 90, 90); } else if (gameObject.name == "Engel(Clone)") { gameObject.transform.eulerAngles = new Vector3(0, 0, degrees); } } } degrees' default value is 90. It is not fast enough. I want to rotate like Helix Jump's does. How can I do that?
Line 5 is the rate of your degree change (one degree per frame) when sliding right. Make it larger and it will spin faster. Ideally you should use something like 100 degrees per second, and then in your degrees math you would instead say: Code (csharp): degrees += 100.0f * Time.deltaTime; (This presupposes that your degrees variable is a float. If it is an integer, the above won't work for all the standard data type reasons.)
Then your only option is to use it on a device that can run your game with more frames per second...because your object can only rotate 1 degree per frame. What i mean by that is that @Kurt-Dekker has the answer you want.