0 votes

I have a RigidBody2d that will detect collision if it falls upon a player but not if a player runs into it even though it acts upon the player's force. What I mean is a player will run into it and be impeded by the falling RigidBody2d. I connected a signal and use the below code.

func _on_snowflake_body_entered(body):
if body.get_name() == "player":
    queue_free()

The snowflakes disappear when they fall on the player just not when the player runs into them.

in Engine by (38 points)

1 Answer

0 votes

You need a Area node.

by (1,443 points)

How do I get gravity to work on an Area2d? The options in the inspector don't do anything.

I got gravity to work on an Area2d but now the signal doesn't work.

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.