0 votes

In my game I want abilities to interact with the ground and with each other, therefore i need to check if an ability was placed in a certain point in order to know if they need to make an interaction or not...

the game is a 2D game

my question is, as the title says, how can i get a list of the collision objects inside a specific region/point?

in Engine by (1,193 points)

1 Answer

0 votes

You can use Area2D and get_overlapping_bodies() or get_overlapping_areas(). This will let you check each effect and see if it's overlapping another one.

by (20,679 points)

Well, I'm currently using area2D but i found out that if i will try and check for collisions on the _ready() function it doesn't register the collisions yet

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.