Skip to content

Commit 40e2a01

Browse files
committed
AmmoPhysics: Add restitution to ammo break example
1 parent 743bd0e commit 40e2a01

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/physics_ammo_break.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,10 +338,10 @@
338338
physicsShape.calculateLocalInertia( mass, localInertia );
339339

340340
const rbInfo = new Ammo.btRigidBodyConstructionInfo( mass, motionState, physicsShape, localInertia );
341+
rbInfo.set_m_restitution(0.5);
342+
rbInfo.set_m_friction(0.5);
341343
const body = new Ammo.btRigidBody( rbInfo );
342344

343-
body.setFriction( 0.5 );
344-
345345
if ( vel ) {
346346

347347
body.setLinearVelocity( new Ammo.btVector3( vel.x, vel.y, vel.z ) );

0 commit comments

Comments
 (0)