ChaseMoskal Posted August 16, 2016 Share Posted August 16, 2016 Hey folks! I was wondering, what are some techniques to accomplish physical interactions against a terrain mesh, imported as an .obj file? I had attempted this earlier, and was having troubles — warnings saying MeshImpostor can only collide with Sphere — or something like that, I don't recall exactly but I'm sure some of you know what I'm talking about. I'm hoping to have objects of all kinds (spheres, cuboids, cylinders, ellipsoids, etc?) physically interacting with static terrain meshes, which will include some bumpy ground, buildings, caves, etc. Also, I haven't really decided on a physics engine yet (oimo, cannon, ammo, etc?), so if one can handle this problem better than others, I'm all ears! Thanks! Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted August 16, 2016 Share Posted August 16, 2016 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted August 17, 2016 Share Posted August 17, 2016 Hi guys. Ever seen the Oimo no-meshImposter terrain? http://lo-th.github.io/Oimo.js/test_terrain.html I was reminded of it... by this thread. @adam's last post in that thread... says it all. There's sphere imposters under that ground. And, as we can plainly see, boxes are tumbling down that terrain, and looking pretty good. But, perhaps you still need meshImposters for the oddly-shaped mesh that you'll be tumbling-around in those hills? Yep, I hear ya. Maybe the wisest move... use CannonJS (because it has meshImposter), but still make a ground like the one we see in that Oimo demo... with lots of sphere imposters beneath. Now use Cannon's meshImposter for your oddly-shaped tumbling mesh. Since meshImposters react with spheres, and since the heightMap ground is actually blanketed with sphere imposters, all should work nicely. Doing the opposite... using a meshImposter for the heightMap, but then, somehow, making compound imposters of many spheres... trying to "fit" oddly shaped tumbling mesh... would likely be more difficult. *shrug* Not sure. All this stuff is still evolving, and "best practices" are still being established. 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.