Quantcast
Viewing all articles
Browse latest Browse all 388

getPhysicsBodyOfMesh to limit physics speed

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 too

How can I use this function?

 

 

Thanks very much!


Viewing all articles
Browse latest Browse all 388

Trending Articles