joshcamas Posted January 31, 2017 Share Posted January 31, 2017 Hia guys! On my current simple physics engine test (http://www.babylonjs-playground.com/#1BVXYE#6), I'm trying to grab the boundaries of meshes in a global way. So I'm just trying to get the bounding box's coordinates. I tried using minimum and maximum, but that doesn't seem to change depending on rotation of the mesh. minimumWorld and maximumWorld works, but not... the values are really strange, and sometimes logs correctly and other times are identical to min and max. If I need to make an example playground I will Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted January 31, 2017 Share Posted January 31, 2017 kind of hard to know what your pg is supposed to look like, but saying you were having problems with min/maxWorlds, I switched to extendSize, which is amount extended past origin. It is basically your halfSize. After more clean up, I get http://www.babylonjs-playground.com/#1BVXYE#9 I that what it is supposed to look like? Quote Link to comment Share on other sites More sharing options...
joshcamas Posted January 31, 2017 Author Share Posted January 31, 2017 Hmmm problem is I'm trying to find the bounding box that reacts to rotations of meshes. See how the plane is rotated? Theres that wireframe mesh that's supposed to visualize the bounding box I'm trying to get. Extend size doesn't seem to do this. I print the object's extend size's z, and it prints 0 for the plane (incorrect) and 1 for the sphere (correct) EDIT: HOLY CRAP IT WORKS! http://www.babylonjs-playground.com/#1BVXYE#12 I was using minimum world bounds incorrectly, turns out it works Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.