User Tools

Site Tools


en:examples:input:object_with_the_mouse

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.txt · Last modified: 2018/02/14 00:47 (7 years ago) by 127.0.0.1