0 votes

I'm a really beginner, sorry if my question is super basic.

I am building a scene for a paddle in a arkanoid style game. I added a staticbody2d node and corresponding children nodes for the paddle's 2d sprite and collisionshape. Than i realized that the staticbody2d and its children sizes didn't match, illustrated in the picture below:

nodes with different size

I thought it would be simple to adjust that, but first i couldn't find width and height properties for the staticbody2d in the inspector. I also tried resizing it by changing the scale property but all the children nodes (sprite and collisionshape) changes size too.

I don't know if it matters in the end, maybe the mechanics of the game should care only for the sprite and collisionshape sizes, but is so annoying to have this staticbody big square when it should match the paddle form.

Thank you.

in Engine by (15 points)

1 Answer

+1 vote
Best answer

Short answer: it doesn't matter.

StaticBody2D does not have a size. The handles you see are the default ones that exist for every Node2D, and are there for moving and scaling in the editor. As you say, the sprite and collision shape are all that matter in game.

FYI, in Godot 3.1, those handles are hidden on collision object types, so you wouldn't see it at all.

by (20,921 points)
selected by

Perfect. Thank you.

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.