-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use a size Vector for adjusting the size of Rectangles and Boxes #44183
Conversation
3d5f201
to
4da4fee
Compare
Updated to correctly display "Size" and the |
This code looks good, and I agree that having a size property makes sense. It's 100% an improvement for CSG. However, there is an argument for having both Anyway, I would like @akien-mga's feedback on this (and anyone else who wants to chime in). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We discussed this in a PR review meeting and agreed with the change.
(Half) extents are still used internally for performance, but it makes sense to standardize everything in the higher level API around sizes.
Thanks! |
Currently, to adjust the size of a
RectangleShape2D
or aBoxShape3D
you modify theextents
, which are half the size of the rectangle or box. This is confusing for the user. Furthermore, although aBoxMesh3D
(aCubeMesh
in 3.2) uses aVector3
for size, aCSGBox3D
uses threefloat
s:width
,height
anddepth
.This PR allows a users to adjust the size of a
RectangleShape
, aBoxShape
, aBoxMesh
and aCSGBox
consistently using aVector
property calledsize
.Part of #16863.