void Update() { if (controller == null) { try { controller = DS4.getConroller(); } catch (Exception e) { Console.WriteLine(e); } } else { // Press circle button to reset rotation if (controller.buttonEast.isPressed) { m_transform.rotation = Quaternion.identity; } m_transform.rotation *= DS4.getRotation(4000 * Time.deltaTime); } }
void Start() { this.controller = DS4.getConroller(); m_transform = this.transform; }