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