View Single Post
  #2  
Old 09-16-2016, 04:41 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
Are you referring to a vizinfo panel? There is no built-in way to do this. I'm not sure if the viz.pick command will work with objects added to viz.ORTHO, like the panel. I'll check and update here if there is a way. It maybe necessary to calculate if a mouse click is within a panel's bounds. You could try the following:

1) Calculate the panel bounds using the node.getBoundingBox method.
2) Handle the mouse down event and determine if the mouse position is inside the panel bounds.
3) Enable an update function that sets the panel position every frame based on the mouse position. The panel position takes screen coordinates and you can get the mouse position in screen coordinates.
4) Disable the update function when the mouse up event occurs.
Reply With Quote