Game Development Reference
In-Depth Information
We need to access the Every tick function because we need to constantly check where the
mouse is. While the mouse moves around the screen, the computer will check to see its
location. If we didn't use the Every tick function or the game loop, the sprite will only ro-
tate once instead of constantly. You usually use the Every tick function for functions that
require constant attention. For most other functions that need to be called once, you can
use other functions. So, let's go ahead and click on Every tick .
Rotating the sprite to the mouse location
Now that we have added the Every tick event, we need to add an action. This action is
going to rotate the sprite to the mouse position. In order to do this, click on Add event .
You should get the following window:
Search WWH ::




Custom Search