Skip to main content

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

Thanks!  The basic code for those involve slowly rotating the projectile towards the player, while moving it forward.  Then it's mostly tweaking the move and turn speeds until it looks right. Higher move speed and lower turn speed results in a wider turn. 

Here's an example (without the spaghetti code):

var MOVE_SPEED = 200
var TURN_SPEED = 0.03
var player_angle = self.global_position.angle_to_point(player.global_position)
self.rotation = lerp_angle(self.rotation, player_angle, TURN_SPEED)
move_and_slide(Vector2.RIGHT.rotated(self.rotation) * MOVE_SPEED)

That's so elegant. I'll save this for the future! Thanks Jason. Cursed Chests is so fun.