How do i get a falling RigidBody2d to detect a collision from the side?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By sumguy05

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":

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

:bust_in_silhouette: Reply From: MysteryGM

You need a Area node.

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

sumguy05 | 2019-01-03 02:18

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

sumguy05 | 2019-01-04 04:01

1 Like

Was having same issue and this worked.
Just make sure to check if you are entering an area or a body.