- Home /
Question by
mustang4484 · Mar 05, 2019 at 03:25 PM ·
webgljoystickfullscreen
Problem on full screen web-gl virtual joystic
Hi guys
I've a virtual joystick on web-gl project, when open website it's work fine, but when go in full screen at pointer down (on the center of joystick) my virtual joystic is always on the up-right side (at first click). After on drag i've the full control, but at the first click it's out of control.
Any suggestion?
Thank you
public override void OnDrag(PointerEventData eventData)
{
Vector2 direction = eventData.position - joystickPosition;
inputVector = (direction.magnitude > background.sizeDelta.x / 2f) ? direction.normalized : direction / (background.sizeDelta.x / 2f);
ClampJoystick();
handle.anchoredPosition = (inputVector * background.sizeDelta.x / 2f) * handleLimit;
Debug.Log(inputVector);
}
Comment
Your answer
Follow this Question
Related Questions
Default WebGL fullscreen button not working in Firefox 1 Answer
Virtual Joysitck for WebGL???? 0 Answers
WebGL FullScreen 2 Answers
problem with ImageEffects in webGL 2.0 0 Answers