GDevelop-extensions
GDevelop-extensions copied to clipboard
Point inside 3D Object
Description
This extension tests if the given point is inside the boundaries of a 3D object.
How to use the extension
Provide X-, Y- & Z-Coordinates to test against a 3D Object. Returns True if the point is inside the given object boundaries.
Checklist
- [X] I've followed all of the best practices.
- [X] I confirm that this extension can be integrated to this GitHub repository, distributed and MIT licensed.
- [X] I am aware that the extension may be updated by anyone, and do not need my explicit consent to do so.
What tier of review do you aim for your extension?
Reviewed
Example file
PointInside3DObjectExample.zip
Extension file
Thank you for submitting this extension.
I have some concerns:
- Using the Z position and the depth will only work for boxes that are not rotated.
- To handle models as a boxes, new expressions would need to be added to get the origin and center point of 3D models
- To handle rotation, it needs a bit of trigonometry.
- Event-based conditions can't pick objects, for now, it needs a bit of JS
- https://github.com/4ian/GDevelop/pull/3163
In which use-cases do you see this extension being used? For projectiles or clicks, I guess a raycast would be a better fit.
This extension is included in the collection of extensions called ToolsFor3D in #1050