Hello,
at the moment I am developing an application/simulation for a local museum (as part of my bachelor thesis).
A few days ago we tested the application on their device (ELO 1939L - Windows 7) and everything seems to work, but the rotation of the Game Object when dragging via touch - there’s no problem when using a mouse.
I’ve before tested the application on my PC (Windows 10 - mouse) and also my phone (Android - touch) and everything works smoothly there.
This is my code:
public class Rotation : MonoBehaviour
{
float rotSpeed = 150;
private void OnMouseDrag()
{
float rotX = Input.GetAxis("Mouse X") * rotSpeed * Mathf.Deg2Rad;
float rotY = Input.GetAxis("Mouse Y") * rotSpeed * Mathf.Deg2Rad;
transform.Rotate(Vector3.up, -rotX, Space.World);
transform.Rotate(Vector3.right, rotY, Space.World);
}
}
Do you guys have any idea why it wouldn’t work on their touch screen device?
Thanks in advance!