amorgan Posted January 30, 2015 Share Posted January 30, 2015 Arising from another thread, currently BabylonJS does not change the bounding box of a model if it is moved by an animations with bones. This makes sense, because the animation is not changing the object, but the vertices of the object. My problem arose because I have a character mesh with a sword (two meshes). I have an attack animation where the character mesh is swinging the sword. In an ideal world the bounding box would move with the sword and I could use that detect collisions with an enemy using the OnIntersectEnter Action Trigger. I have some work around solutions to this specific problem, but I would think this could be useful for other scenarios as well. Not knowing much about the inner workings, I would guess you could calculate the bounding box during animation similar to doing a precise mesh calculation. Though it would be nice to do a normal bounding box that was just a max box dimension. It might be usefull for these to be variables: 1) bounding box to track animations - boolean2) whether the bounding box is precise or simple (though this might be apart of the Action manager Trigger) - boolean Some of that is thinking out loud, what do you guys think? Quote Link to comment Share on other sites More sharing options...
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.