Player Movement using joystick based on camera facing
Clash Royale CLAN TAG #URR8PPP Player Movement using joystick based on camera facing I develop Offline FPS Multiplayer Game. When the Player Rotation value (0,0,0) then Player Move perfectly in Direction. but my problem is when i rotate the camera using touch input then player can also rotate his face and press to joystick button for move the player then player can not move the direction of camera facing. My Joystick Script For Player public class VirtualJoystick : MonoBehaviour, IDragHandler, IPointerUpHandler,IPointerDownHandler { private Image bgImg; private Image JoyStickImage; private Vector3 InputVector; private void Start(){ bgImg = GetComponent<Image> (); JoyStickImage = transform.GetChild (0).GetComponent<Image> (); } public virtual void OnDrag(PointerEventData ped){ Vector2 pos; if (RectTransformUtility.ScreenPointToLocalPointInRectangle (bgImg.rectTransform, ped.position, ped.pressEventCamera, out pos)) { pos.x = (pos.x / bgImg.rectTransfo...