-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Update GetGroundZFor_3dCoord.md #905
base: master
Are you sure you want to change the base?
Conversation
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.
It might be a good idea to have distinctions between runtimes too as in c# groundZ would be a ref you would pass in iirc.
MISC/GetGroundZFor_3dCoord.md
Outdated
Bear in mind this native can only calculate the elevation when the coordinates are within the client's render distance. | ||
``` | ||
This native gets the ground level (ground elevation) and returns the Z coordinate that represents it. | ||
Old Note: This native can only calculate the elevation when the coordinates are within the render distance of the client. |
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.
This should probably just be a Note.
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.
Done.
MISC/GetGroundZFor_3dCoord.md
Outdated
* **x**: Position on the X-axis to get ground elevation. | ||
* **y**: Position on the Y-axis to get ground elevation. | ||
* **z**: Position on the Z-axis to get ground elevation. | ||
* **includeWater**: Detemenies if the top water level at the specified position should be considered the ground elevation. (It would only matter if the specified position is located above or under the water) |
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.
typo, should be Determines
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.
Oops, changed.
3db6632
to
472fcdf
Compare
472fcdf
to
978f14d
Compare
How should I represent it? |
In C# you would reference it, so essentially: float groundZ;
API.GetGroundZFor_3dCoord(x, y, z, ref groundZ, true); Please note that I haven't tested this, merely an example. |
Just an overall cleanup of this specific native's docs page and a change of its 4th parameter that was wrongly named.
"ignoreWater" suggests that the parameter is a toggle for ignoring the water, whilst when setting it to true, the top water level becomes the ground level returned by the native.
Test:
The larger result of the two represents the top water level, and the smaller result represents the bottom water level.
Therefore the 4th parameter should be considered to include the water.