Hey, I'm trying to figure out how to get the size of my camera node, however using self.size.x does not work
Get Dimensions of Node?
What are you trying to do/achieve with that? If you want the screen resolution that is defined in the project settings.
Mainly I just want to know how to get the size of my nodes in general, like sprites and such, not the screen resolutioon
10 days later
It depends on the node type. A sprite's size is given in pixel size of the texture, so Sprite.texture.get_size() will do the job. If you work with a 3D node, the size is defined by it's mesh. You can get the dimension with MeshInstance.mesh.size
3 years later
- Edited
I know this is a stale thread, but I needed a solution for this as well and found one.
var new_rect = your_anim_sprite.get_sprite_frames().get_frame("choose_an_animation_name",0).get_size()
You have to drill down through your animation to get to a frame you want to get_size from. Good luck!
a year later
Megalomaniak added the Godot Help tag .