joshcamas Posted September 13, 2014 Share Posted September 13, 2014 Hello! I've been trying to get Oimo working, and all I've managed to do is a very basic imposter and compound imposter. My question is... what does Babylon support for Oimo at the moment? joints? motors? I can't seem to find any documentation on this, and would be grateful for answers. :3 Thanks! EDIT: Also, is it possible to have collisions without having physics? Thanks again! Quote Link to comment Share on other sites More sharing options...
r2d2Proton Posted September 13, 2014 Share Posted September 13, 2014 I'm anxious to give this a shot too. . .waiting to hear your progress. Quote Link to comment Share on other sites More sharing options...
davrous Posted September 14, 2014 Share Posted September 14, 2014 Hi, Our collision engine is natively embedded in our Babylon.js engine. You check the tutorials on github or on the playground: http://www.babylonjs.com/playground No need for physics engine. About Oimo, Temechon has done the plugin for us. You can read his code here: https://github.com/BabylonJS/Babylon.js/blob/master/Babylon/Physics/Plugins/babylon.oimoJSPlugin.js and check our online demo to discover features: http://www.babylonjs.com/index.html?physics David Quote Link to comment Share on other sites More sharing options...
joshcamas Posted September 15, 2014 Author Share Posted September 15, 2014 Ahhh that's where the plugin is! Thanks a lot!!!! Quote Link to comment Share on other sites More sharing options...
joshcamas Posted September 16, 2014 Author Share Posted September 16, 2014 Ok, so how would one create something like a player... I tried making a sphere for the physical properties, then a cube as the collision stuff, then connecting these. But that just ends up weird when you run into something and you fly into the air... So how should I create an actual player or creature? And also use movement? Thanks! EDIT: As I'm testing more and more things, the more confused I'm getting! Is it possible to have a mesh with gravity and collisions enabled, but not have fancy bouncy engine? I don't want a player that is bouncy or gets rolled over or anything! Quote Link to comment Share on other sites More sharing options...
Dad72 Posted September 16, 2014 Share Posted September 16, 2014 Here is how you can do:var meshPlayer = actor || creature:// Player collision and gravitymeshPlayer.ellipsoid = new BABYLON.Vector3(0.5, 1, 0.5));meshPlayer.ellipsoidOffset = new BABYLON.Vector3(0, 3, 0);meshPlayer.applyGravity = true;var VitessePerso = 8; // Speed run (walk = speed = 4 or 3)var gravity = 0.15;var forward = new BABYLON.Vector3(parseFloat(Math.sin(parseFloat(meshPlayer.rotation.y))) / VitessePerso, gravity , parseFloat(Math.cos(parseFloat(meshPlayer.rotation.y))) / VitessePerso); // forwardvar backwards= forward.negate(); // backmeshPlayer.moveWithCollisions(forward or backwards); // move player with collision and gravity.// CollisionGround.checkCollisions = true; // the ground get collisions.House.checkCollisions = true; // the house get collisions.Wall.checkCollisions = true; // the wall get collisions. JackFalcon 1 Quote Link to comment Share on other sites More sharing options...
joshcamas Posted September 17, 2014 Author Share Posted September 17, 2014 Sorry to bother you again, but could you have a playground example for this? I'm not getting it to work. :S http://www.babylonjs.com/playground/#1NEYPW This physics confusingness is really turning me off towards Babylon - it seems like the top "problem" with the engine... too many plugins, along with confusing collision stuff... D: If someone could like show some code on how to make a character move around and have collisions and everything, that'd be bomb. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 17, 2014 Share Posted September 17, 2014 This is because you're doing collisions and not physics:http://www.babylonjs.com/playground/#1NEYPW#1 Quote Link to comment Share on other sites More sharing options...
joshcamas Posted September 17, 2014 Author Share Posted September 17, 2014 YESSS!!!!! IT'S BEAUTIFUL! THANK YOU! I have managed to understand how Euler stuff works, so now I get it!This has broken the one barrier I have had for this engine - thank you so much! I'm so excited! xD GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 18, 2014 Share Posted September 18, 2014 We will break all your barriers Wingnut and WombatTurkey 2 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.