- Home /
Question by
noobakashi · Jan 29, 2012 at 01:22 PM ·
touchrotatedrag
Using Touch and Drag to rotate objects.
Hi, I'm using the following script to simulate a touch and drag to rotate an object with mouse drag. If i were to convert the working of this script so that i can obtain the same outcome with a touch and drag on a iOS device what sort of changes do i make?
if(Input.GetMouseButton(0))
{
h = horizontalSpeed * Input.GetAxis("Mouse X");
transform.Rotate(0, h, 0);
v = verticalSpeed * Input.GetAxis("Mouse Y");
transform.Rotate(v, 0, 0);
}
Comment
Your answer
Follow this Question
Related Questions
How to rotate an object based on angles? 1 Answer
Rotate on drag for IOS? 1 Answer
Android touch and drag GUItexture problem 0 Answers
Dragging UI Image by touch 3 Answers
Simultaneous Touch Drag Controls 0 Answers