0 votes

I can't actually scale it down like you usually would do in this case, because it will scale down all the childrens of it, and since I'm working with pixel art this gizmos is HUGE. I couldn't find any settings to change this, any suggestions?

in Engine by (1,086 points)
edited by

Position2D can be scaled. What do you actually mean?

This Position2D has children, and I don't want to scale up all the childrens to compensate for the Position2D scale.

You mean you want the "gizmo" of Position2D to be bigger/smaller?

Yes, that's it.

1 Answer

0 votes

The size of Position2D is hardcoded, it's litteraly this:

void Position2D::_draw_cross() {

It cannot be changed unless you scale the node.

If you have a suggestion for this (setting? size adjusts with zoom?) you can create an issue on Github.

by (27,270 points)

Can't I overwrite it's function? (in GDScript)

You could try to implement _draw in a script, but I don't think it will overwrite the C++ code.

Could be nice to have an option to set the lines lenght on the Position2D, but not affected by the scale because you may want to keep the line size and play with the scale as a common node.

But just use a Node2D instead with custom drawing as Zylann explained.
More on custom draw:

To use that in the editor (like a Position2D) you will have to use the tool mode on the script too.

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.