This tutorial has moved to the [Rajawali Wiki](https://github.com/MasDennis/Rajawali/wiki/Tutorial-16-Collision-Detection).
[...] Rajawali Tutorial 16: Collision Detection [...]
I was looking into using OBJs for collision (still trying to get MD2s working)
Is there any reliable way to know which child has the geometry in it? or should we just cycle through them all and whichever has vertices != null is the one to use?
This is of course for single object models.
Getting the bounding box by using model.getChildAt(1).getGeometry().getBoundingBox() works for now but I’d like to know how likely the (1) is to change.
To follow up my previous post, it seems that the child element is only used when there are multiple objects.
Maya was exporting the OBJ incorrectly (for use with Rajawali anyways) and created a “default” object then the object I selected to export (hence why it was in the second array position).
By correcting the OBJ file, you can just use the model.getGeometry().getBoundingBox()
Email (will not be published) (required)