bill barsch Posted November 28, 2015 Share Posted November 28, 2015 Hello, I´m using the new babilon 2.3 and Cannon physics to take advantage of heightmaps physics.I´m applying some impulses to move my Character and it´s ok, but I have to limit it speed, because it keeps growing and growing.So I try to access the body inside the physics plugin engine with no success, to try some configs like: inertia(0,0,0) or somethink like that.(I dont know if it will do what I want, using oimo.js, the ".body.linearVelocity.scaleEqual(0.92);" was working very well but oimo don´t have heightmaps physics that I need). I try: BABYLON.PhysicsEngine.getPhysicsBodyOfMesh(mymesh);but getPhysicsBodyOfMesh is undefined.I try scene.PhysicsEngine.getPhysicsBodyOfMesh()but undefined tooHow can I use this function? Thanks very much! Quote Link to comment Share on other sites More sharing options...
RaananW Posted November 29, 2015 Share Posted November 29, 2015 Hi and welcome! Sorry, I just saw your message This is rather simple. To get the body mesh you need to get the defined physics engine from the scene and then run the function on this object. so:scene.getPhysiscEngine().getPhysicsBodyOfMesh(yourmesh); bill barsch 1 Quote Link to comment Share on other sites More sharing options...
bill barsch Posted December 10, 2015 Author Share Posted December 10, 2015 tanks RaananW now it´s working 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.