![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | mimimomo |
Is there a way to reference the radius or width of Area2D, CollisionShape2D or CollisionPolygon2D in Godot 3?
I am making a skill-based RPG. I currently check skill range with an circular Area2D/CollisionShape2D attached to the sprite. If the sprite of the target character overlaps with the Area2D, then the character can cast the skill on them. Here’s the range bubbles around the sprites:
Next, I want enemies to move to be just in range of the player character. In other words, I want to enemies to move to the position of the player character minus the radius of the character’s Area2D. Is there any way to get that information from the Area2D?