I’m trying to make an enemy scene (Area2D), and I want it to spawn mid-air and then fall on the ground. How can I do that? I tried
if not is_on_floor():
velocity += get_gravity() * delta
but is_on_floor() does not work on Area2D nodes unlike CharacterBody2D nodes. So I searched up a tutorial and didn’t find one applicable to Area2D nodes. Thanks!
Like you observed, there is no is_on_floor() method on the Area2D, but there is on CharacterBody2D.
Why don’t you want to use CharacterBody2D for your enemy? That’s a standard practice.