User Tools

Site Tools


en:examples:input:object_with_the_mouse

This is an old revision of the document!


Moving an object onto the mouse position

Code

orxVECTOR mousePosition = orxVECTOR_0;
 
orxMouse_GetPosition(&mousePosition);
orxRender_GetWorldPosition(&mousePosition, orxNULL, &mousePosition);
 
mousePosition.fZ = 0;
 
orxObject_SetPosition(someObject, &mousePosition);
en/examples/input/object_with_the_mouse.1518583663.txt.gz · Last modified: 2025/09/30 17:26 (12 days ago) (external edit)