How do I properly get the position where an interface click event occurred?
That is, in an InputActionMap I have the standard “Click” event as below.
I add a performed listener, but then want to know where it occurred. Right now I’m reading the current mouse position, which isn’t correct since it might not be a mouse (could be pen/finger/other).
void OnClicked(InputAction.CallbackContext context) {
var position = Mouse.current.position.ReadValue();
What’s the right way to get the position at the time the “Click” action happened?