Hi everyone, I have a little problem which I can’t deal with, well the thing is that I have a BABYLON.pickingInfo object obtained from using pickWithRay method, now I want to simulate left mouse button click from inside the game which will be seen in onPointerObservable
I need it to reflect the move of one player in second player’s game and vice versa.
I came across this methods and tried to use the code below but with no effect, it is possible that I am misusing this method but it is undocumented and does not include examples, so I have a hard time telling if I am using it properly:
let hit = scene.pickWithRay(ray)
scene.simulatePointerDown(hit, {button: 0, buttons: 0, pointerType: “mouse”})
I want my simulate click to get inside this closure:
We support three types of event simulations - PointerUp, pointerDown and PointerMove. PointerTap is actually simulated using PointerDown and PointerUp, so you will need to simulate both in order to use this specific pointer event type (without a pointermove in the middle)