Hi, is it possible to get the full DOM event info from a “pointerdown” event on a gui2D control? Currently I’m adding the event with control.onPointerDownObservable as stated here: Control - onPointerDownObservable
but I can only get a Vector2WithInfo that only has x, y and buttonIndex properties.
But for instance with scene.onPointerObservable you get access to the whole PointerInfo which provides the DOM Event object.
So, is it possible to get the full event info from a gui2D control “pointerdown” somehow? I’m particularly interested in the pointerType, ctrlKey and some other event properties.
I tried that on the first place as well, but that second parameter is a BABYLON.EventState and doesn’t seem to have the event properties as the PointerInfo object.
Thanks Deltakosh! But it may not be a bug and its just the way it is designed? In the docs it states that observable.add has two arguments in its callback which are an Eventdata and Eventstate. In the case of control.onPointerDownObservable.add these are the Vector2withInfo and the EventState. So it may be better to extend the Vector2withInfo with a property with he DOM event data or a pointerInfo? To not break backward compatibility