Hi there,
Im trying to make a drag drop, and it works
However issue is first pointer position is always 0, but next call returns the right value, in the editor, which is problematic and i want to understand why its happening like this.
Here is my setup
My code where first p
inputActions.Player.PointerPosition.performed += OnPointerPosition;
inputActions.Player.PointerClick.started += OnPointerDown;
inputActions.Player.PointerClick.canceled += OnPointerUp;
private void OnPointerDown(InputAction.CallbackContext obj)
{
lastMousePosition = inputActions.Player.PointerPosition.ReadValue<Vector2>();
//its zero but next call will return actual player position
}
Please advise