Cursor Movement
Since it is a mobile game we must add Touch controls to the Layout.
Since it is a mobile game we must add Touch controls to the Layout.
In the event sheet create a Group called Controls
In the event sheet create a Group called Controls
Add code to make the cursor follow the touch
Add code to make the cursor follow the touch
Add code to make the cursor go to the touch position
Add code to make the cursor go to the touch position
LERP ensures that the cursor moves SMOOTHLY and not jarringly.
LERP ensures that the cursor moves SMOOTHLY and not jarringly.
MAX and MIN clamps the x and y position between the screen edges.
MAX and MIN clamps the x and y position between the screen edges.