elessar.perm Posted December 11, 2014 Share Posted December 11, 2014 Hey guys! I'm trying to make some advanced physics in my babylon project. To be more concrete: There is a brick wall and a cannon in front of it.Cannon makes a shot and when the shell collides with wall I want to shatter them.So, for the wall I have two options:Voronoi FractureBreak the wall into bricksAssume I will use second one.According to forums I should break wall mesh into group of bricks with joints and remove some of them if the force is too strong. And this is where the question appears: what is the best option to deal with it?Should I expand oimo/cannon plugin to have more control over joints and ability to add native event listeners for collisions or just use Actions with intersection trigger? For now both plugins hide their world property and just implement plugin interface. Thanks. p.s. I'm new for babylon so it will be great if you could answer more detailed! Quote Link to comment Share on other sites More sharing options...
joshcamas Posted December 12, 2014 Share Posted December 12, 2014 It sounds like expanding would be a better option, because you cannot attach a intersection trigger between one object and "every other object in the game". In other words, you have to specify two specific objects for intersection trigger. If your wanting this, do this. if you want a function to be called when anything intersects, I'm guessing OIMO or Cannon would be your best bet. Anyone else smarter have any better input? P.S: Nice avatar elessar.perm 1 Quote Link to comment Share on other sites More sharing options...
elessar.perm Posted December 12, 2014 Author Share Posted December 12, 2014 Thanks for your reply! This is something I wanted to know . And a little one question by the way: How do I avoid situation when small and very fast shell (sphere) just flies through wall and doesn't collide it? I think I should increase physics precision in some way, but I don't understand how to achieve it without big impact on performance? Quote Link to comment Share on other sites More sharing options...
joshcamas Posted December 13, 2014 Share Posted December 13, 2014 Well having such a fast object would be very hard to fix- from my limited knowledge of the physics engine Im pretty sure if at one frame the object is on one side of the wall and the next frame on the other, it wouldn't detect collision.However this is just a guess Quote Link to comment Share on other sites More sharing options...
Wingnut Posted December 13, 2014 Share Posted December 13, 2014 Hi Elessar... welcome to the forum, good to have you with us. I did some goofing around... http://playground.babylonjs.com/#1FR0VN Saturday morning Oimo fun. There's a protective sheet of glass between you and the destruction, so it should be safe for kids, too. elessar.perm 1 Quote Link to comment Share on other sites More sharing options...
elessar.perm Posted December 13, 2014 Author Share Posted December 13, 2014 Thank you! This is great example!I like Oimo for its speed. Shortcomings like limited body impostors are not very serious.One last problem I have is physics precision as I told before. I'm afraid that I need to implement sort of continuous collision detection by myself. Quote Link to comment Share on other sites More sharing options...
joshcamas Posted December 15, 2014 Share Posted December 15, 2014 Well maybe if you made an example in the playground some of us could play around with it :) GameMonetize 1 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.