Skip to content
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 HeightMapShape3D functions to get min / max height #87881

Merged
merged 1 commit into from
Feb 5, 2024

Conversation

smix8
Copy link
Contributor

@smix8 smix8 commented Feb 2, 2024

Adds HeightMapShape3D functions to get min / max height.

Not sure why those were never exposed while already tracked on the shape. Knowing what is the min and max height in the heights array is very useful information to avoid looping over the entire large array manually.

Also there are no longer pool arrays in Godot 4, they are now packed arrays, but I don't see much value in mentioning this in the text when the function makes it obvious.

@smix8 smix8 added this to the 4.3 milestone Feb 2, 2024
@smix8 smix8 requested a review from a team as a code owner February 2, 2024 22:14
Adds HeightMapShape3D functions to get min / max height.
Copy link
Contributor

@Mickeon Mickeon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs are nice. I can somewhat speak on implementation? These values already existed internally, this PR just exposes them.

Copy link
Member

@kleonc kleonc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exposing these makes sense to me.
(+I think I've already seen these values being calculated manually in some user code; not sure if I'm not making this up though 😆)

@akien-mga akien-mga merged commit fbd2034 into godotengine:master Feb 5, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants