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 08:47 (2 years ago) (external edit)