Coppel.Damien Posted April 27, 2021 Share Posted April 27, 2021 Hi everyone, is there any way to get callbacks when clicking on/hovering over a shape drawn by the Visualizer class ? I'm interested in achieving stuff like : - Changing the color of a point drawn with Visualizer::renderPoint3D(...) when hovering over it. - Receiving the XYZ coordinates of that point when clicking on it It seems that intersections won't help since the shapes drawn aren't objects and have no physical properties. I know there must be some way to do it since the XYZ axis in the editor are drawn by visualizer (or something similar I guess) and it is interactive. It changes color when you put your mouse over it, and clicking on it makes you able to move nodes around. Is it achieved by applying an invisible body to the shapes drawn and then using raycasting from the mouse position to the shape ? Link to comment
silent Posted April 28, 2021 Share Posted April 28, 2021 Hi Damien, Visualizer is designed only for the visualization, user interactions (highlighting / intersections) are not included. Editor manipulators are made with WidgetCanvas (it has getPolygonIntersection() method). Thanks! 1 How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
Recommended Posts