Hi all,

I am trying to drag a vertex of a mesh from its position to a new one using the two events: mouse button press and mouse button release.

I can detect those two events and the positions of my mouse in the screen at both times.

When I click the button close to a vertex, I use the following function in order to get the corresponding point in the coordinate system of my mesh: PluginFunctions::scenegraphPick(ACG::SceneGraph::PICK_ANYTHING,_event->pos(), node_idx, target_idx, &hitPoint); 

But once I move my mouse and release it, I can only get the position of my mouse in the screen.

Do you know an easy way to convert the position of the mouse from the screen coordinate to my mesh coordinate?

Thank you in advance,
Juliette