Quantcast
Viewing all articles
Browse latest Browse all 388

How to create a hollow box (open from top side)

Hi all

 

I want to create a box (or a mesh) which should be open from top side. I will use it to drop items into it  using a physics engine such as cannon.js

 

 

For example the physics applied to the box will be

box .setPhysicsState(BABYLON.PhysicsEngine.BoxImpostor, {mass:0, friction:0.5, restitution: 0.4});

 

The items dropped into the box will use physics

items.setPhysicsState(BABYLON.PhysicsEngine.BoxImpostor, { mass: 1  });

 

 


Viewing all articles
Browse latest Browse all 388

Trending Articles