touchscreen / tap lite-c code tip

Posted By: Reconnoiter

touchscreen / tap lite-c code tip - 09/25/16 21:57

Quick tip if you want to mess around with touchscreen in lite-c code (so not using windows functions):

do a wait(1); before doing your actions that use the mouse cursor pos (like e.g. creating an entity at mouse cursor position on mouse_left / double tap), cause otherwise the position of the tap is not yet updated in Gamestudio3d but the action is done. Waiting 1 frame gives the new mouse cursor position. In most cases this shouldn't give any noticeable lag.

Happy dirty Acknexing! grin
Posted By: Reconnoiter

Re: touchscreen / tap lite-c code tip - 09/26/16 10:07

Found out that waiting 1 frame does not prevent swipes from using the outdated position, to solve that you have wait an another frame: so use wait(2); instead of wait(1);.
© 2024 lite-C Forums