Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics


Fantasy computer for making, playing and sharing tiny games. · By Nesbox

360 degree movement?

A topic by sammy6 created Dec 14, 2019 Views: 185 Replies: 3
Viewing posts 1 to 3

So I want to make something that moves toward the mouse at a constant speed. Something like this gif. How would I be able to do that? 

This is the method:

Although written in a different language (Basic), it's very straightforward to convert to Lua :D

Interesting. Is there an equivalent of getAngle() in lua?

In that example getAngle() is just a function that returns an atan2 value. That's available in Lua and is all you need to get the desired effect.