I want to rotate a cylinder with touchs. DeltaPosition.x is bigger than 0 then it will rotate. I did it like this:
deg -= 150f * Time.deltaTime;
transform.eulerAngles = new Vector3(0, 0, deg);
Is there any better way?
I want to rotate a cylinder with touchs. DeltaPosition.x is bigger than 0 then it will rotate. I did it like this:
deg -= 150f * Time.deltaTime;
transform.eulerAngles = new Vector3(0, 0, deg);
Is there any better way?
What do you mean by “better”? If you want it to feel more natural, you probably want to use DeltaPosition.x directly (in this case not including a Time.deltaTime multiplier), as that will feel more 1-to-1 with the user’s movements which usually feels better.
Beyond that, you’ll have to more clearly define what you mean by “good gameplay” and “better way”.