Quantcast
Channel: UGUI & TextMesh Pro
Viewing all articles
Browse latest Browse all 23263

virtual joystick

$
0
0
I'm trying to create a virtual joystick using DragHandler, how do I make it functional? Because the X and Y directions are not correct, whenever the Vector moves diagonally, it follows my code:
Code (CSharp):
  1. using UnityEngine;
  2. using System.Collections;
  3. using UnityEngine.EventSystems; // Required when using event data
  4.  
  5. public class Joystick : MonoBehaviour, IDragHandler
  6. {  
  7.    
  8.     public float vy;
  9.     public float hx;
  10.     public float velocidade=0.0f;
  11.     public Transform player;...
virtual joystick

Viewing all articles
Browse latest Browse all 23263

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>