Replies: 2 comments 2 replies
-
Just for clarity, there are no integers, it's all floats. You can avoid this whole process by using the same |
Beta Was this translation helpful? Give feedback.
-
This feels like something that doesn't fit most workflows for designing 2D physics to match the visuals, it's usually (in my experience) not a simple numbers game but a visual process, rarely does the shape "just fit" the sprite bounds, and you usually want margins, etc. I doubt this specific use case would be used much |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
PROBLEM: If you want to match the sprite size to the collision shape size in code it is math and bug heavy.
EXAMPLE: A simple sprite a user can click and move: Area2D a CollisionShape2D (rect) and a Sprite2D
The collision rectangle uses size x and y (essentially width and height).
The sprite uses scale. So now you're dealing with floats and ints and division. Disaster and a regular source of bugs.
PROPOSAL: I'd like a size property on sprite2D, x and y, width and height.
Beta Was this translation helpful? Give feedback.
All reactions