How to scale down the Position2D?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By mateusak
:warning: Old Version Published before Godot 3 was released.

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?

Position2D can be scaled. What do you actually mean?

Zylann | 2016-12-30 19:01

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

mateusak | 2016-12-31 01:18

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

Zylann | 2016-12-31 02:12

Yes, that’s it.

mateusak | 2016-12-31 14:52

:bust_in_silhouette: Reply From: Zylann

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.

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

mateusak | 2016-12-31 15:37

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

Zylann | 2016-12-31 15:38

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.

eons | 2016-12-31 18:05