0 votes

I have recently come to Godot after using Unity and am trying to get to grips with the 2D nodes. Can someone explain to me the difference between the Area2D and the CollisionShape2D nodes? In my head they, both do the same thing and I don't have a clear understanding of what makes them different.

Thanks

asked May 14 in Engine by camarones (74 points)

1 Answer

0 votes
Best answer

A collision shape is only a shape. It doesn't do anything other than define an enclosed region. An Area2D is one of the CollisionObject2D types - things that can detect collisions.

When you add an Area2D, it doesn't have a shape. Is it round, square, etc.? The CollisionShape2D lets you define that. Its name comes from the fact that it's a shape which is added to collision objects.

I recommend you read this to get an understanding of the various collision and physics nodes:
http://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html

answered May 14 by kidscancode (4,172 points)
selected 1 day ago by camarones
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.