Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+1)

Sure! Feel free to use the mechanism, no credit necessary :3 It's really simple. Create a Area2D that always follows the mouse

position = get_global_mouse_position()

Then, each frame, for everything that is within the range, change their direction

position = position.move_toward(p, strength) #in the game, strength is 0.2 (before upgrade) and 1.2 (after upgrade)

direction = (position - mouse_position).normalized()