-
-
Notifications
You must be signed in to change notification settings - Fork 99
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
Add an AABBi type #3679
Comments
I made my own That said... even if Godot gets |
I guess that if you implemented yours, there's not a lot of point in switching indeed. I guess for the features that could be missing, users would probably implement helper function instead, that would take the AABBi as arguments. (Those function don't necessarily need to be inside the AABBi class) |
Yeah true. I did that with Vector3i, I needed all these https://github.com/Zylann/godot_voxel/blob/ed5bca22c7c1fd60ad3695f649792a90f6972901/util/math/vector3i.h#L271 |
See also #1671:
I recall there was a discussion at Matrix chat, where @bojidar-bg (who used to actively contribute to Godot development) was also in favor of adding See also godotengine/godot#36436 where |
I'm working on a grid-based dungeon crawler, with a 3D world. |
Describe the project you are working on
A voxel-based game
Describe the problem or limitation you are having in your project
In our voxel-based game, working with 3D volumes is difficult. Selection areas, zones occupied by a "big tile", areas of effects, etc... need to be computed using a position and size tuple with Vector3i types.
Their manipulation can be difficult (unlike it is with the AABB type, though that one uses float values). Functions AABB provides like
abs()
,grow()
or accessors likeend
would be quite useful in an Integer-based sapce.Describe the feature / enhancement and how it helps to overcome the problem or limitation
Similar to what we have in 2D with Rect2i, it would be quite handy in the 3D space to have a type to represent a 3D integer volume.
This can be useful for any kind of grid-based 3D games, but it's a also a generic useful data structure.
Internally, I suppose the GridMap API could also be modified to make use of such a new type (maybe VoxelGI too I'm not sure?)
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
We would add the AABBi type. Which would be AABB but with Integers, or Recti but in 3D.
If this enhancement will not be used often, can it be worked around with a few lines of script?
I guess a AABBi extending
Object
type could be created using a script, but it would not provide the same ease of use as built-in types.Is there a reason why this should be core and not an add-on in the asset library?
I guess similarly to Rect2i for Rect2, the AABBi counterpart of AABB should most likely be core.
And it would be easier to use as a built-in Variant type.
The text was updated successfully, but these errors were encountered: