How should I select scene objects by mouse?

34 views
Skip to first unread message

zanx...@126.com

unread,
Mar 22, 2024, 5:18:52 AM3/22/24
to ProjectChrono
There are too many places involving mouse in the example, and the corresponding reference code is not found. I wonder if you can provide a link or simple code to realize the example of selecting and moving objects. Thank you for your guidance.

Dario Mangoni

unread,
Mar 22, 2024, 8:31:01 AM3/22/24
to ProjectChrono
No interaction with the mouse. The GUI is intended to render objects, not to interact with them.

zanx...@126.com

unread,
Mar 23, 2024, 10:05:01 PM3/23/24
to ProjectChrono
I found in https://github.com/projectchrono/chrono/blob/main/src/chrono_irrlicht/ChIrrCamera.h,
<code>
SceneManager->getSceneCollisionManager()->getSceneNodeFromScreenCoordinatesBB(device->getCursorControl()->getPosition(),0xFF,false);

if(selectednode)
   pointCameraAtNode(selectednode);

But when I cancel the comment, the gui does not work properly, please help to give guidance, thank you
Reply all
Reply to author
Forward
0 new messages