Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

I haven't done a lot with raycasting. I'll look into that. I do handle collisions with the tilemap via the CharacterBody2D obviously, is it the same with the raycast? Like it would give me a collision that I would then be able to work with and get tile positions from, etc...? As for the spawners, they are in the air, and they have a radius for spawning. I should likely have used that same raycasting to identify if an aniticipated spawn location was a valid location before spawning the fly. Other than that, the spawners only spawn fliws if the player is within a certain radius, which, in hindsight, I probably should have just made if they were in-camera. I appreciate the feedback and advise!

I'ts better to use Raycast, because it you use  the collider of the rigidbody, it may be too late then collision is detected. Raycasts are longer and you can make them detect specific layers.