Skip to content

Instantly share code, notes, and snippets.

@flushpot1125
Last active December 15, 2022 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save flushpot1125/4c0d46e8b97abe1ada50b5d21b94ef96 to your computer and use it in GitHub Desktop.
Save flushpot1125/4c0d46e8b97abe1ada50b5d21b94ef96 to your computer and use it in GitHub Desktop.
sphere.physicsImpostor = new BABYLON.PhysicsImpostor(sphere, BABYLON.PhysicsImpostor.SphereImpostor, {mass: 2, restitution: 0.4});
cube1.physicsImpostor = new BABYLON.PhysicsImpostor(cube1, BABYLON.PhysicsImpostor.SphereImpostor, {mass: 0, restitution: 0});
cube2.physicsImpostor = new BABYLON.PhysicsImpostor(cube2, BABYLON.PhysicsImpostor.SphereImpostor, {mass: 0, restitution: 0});
wall1.physicsImpostor = new BABYLON.PhysicsImpostor(wall1, BABYLON.PhysicsImpostor.SphereImpostor, {mass: 0, restitution: 0});
wall2.physicsImpostor = new BABYLON.PhysicsImpostor(wall2, BABYLON.PhysicsImpostor.SphereImpostor, {mass: 0, restitution: 0});
wall3.physicsImpostor = new BABYLON.PhysicsImpostor(wall3, BABYLON.PhysicsImpostor.SphereImpostor, {mass: 0, restitution: 0});
wall4.physicsImpostor = new BABYLON.PhysicsImpostor(wall4, BABYLON.PhysicsImpostor.SphereImpostor, {mass: 0, restitution: 0});
ground.physicsImpostor = new BABYLON.PhysicsImpostor(ground, BABYLON.PhysicsImpostor.BoxImpostor, {mass:0, restitution: 0, friction: 1})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment