I am working on project where when I doubleclick on mesh it creates sphere on it, like this:
the screen is taken after dblclick and I didn’t move the mouse cursor
When I switch routes I remove eventlistener and destroy babylon engine by:
document.removeEventListener("dblclick", this.handleMouseEvent, false); this.engineService.scene.dispose();
When I come back to babylon engine again and I want to make measurement (so I create again new scene and new event listener)
the measurements are being taken like this:
I didn’t moved mouse cursor here too
compared to first picture it’s like a little off the top of the cursor and it shouldn’t be like this. I wanted center of sphere when being created to be on the top of cursor.
Actually it’s happening even when I don’t remove scene and eventlistener. Just switching routes and coming back to babylon engine making taking measurements acts oddly.