0 votes

So every time I add an Area2d it doesn't show up as a box.. Its just one little dot, almost looks like a plus sign.. I believe that is messing up my ability to make my player transport from one map to another..

I try adding a sprite to it, and collision.. But I think without the Area2d being a proper square say 32x32 instead of this plus sign, it wont work.. :(

So can anyone tell my why its showing up as a little plus sign looking thing.. and or, how to get it to stretch out ?

in Engine by (12 points)

1 Answer

+1 vote

An Area2D doesn't have any size or shape of its own. You must add a collision shape to define the region it influences. If you want it to be visible, you then add a Sprite or Polygon2D or other visible node.

This is a good introduction to how collision objects (Area2D and PhysicsBody2D) work:

by (20,673 points)

I just came into the same problem following heartbeast's platformer game tutorial. He adds an area 2D and it comes into the scene as a 32 X 32 box. Perhaps it was an older version of Godot; anyways, following the tutorial, you then add the godot icon, move the Area2D elsewhere on the screen, then add a collision shape2D and adjust the Extends to 32 X 32. This seems not to work. The problem is, if you try to follow these steps in a current version of Godot, you have moved icon.png from it's parent location, so you're not actually looking at the Area2D which is still up in the left corner of the scene.

Not sure if that's the same issue, but hopefully this helps someone.

I was able to continue the tutorial by first adding a CollisionShape2D, setting it to rectangle, dragging out the collision shape. Then adding the sprite. Align the three nodes(with Area2d in the middle), use the "make sure children is not selectable" button. Place it and continue the tutorial.

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.