Esempio n. 1
0
 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);
     }
 }
Esempio n. 2
0
 void Start()
 {
     this.controller = DS4.getConroller();
     m_transform     = this.transform;
 }