I made a sample of falling coins in Babylon.js.
Coins created with PBR materials are displayed neatly.

I made a sample of falling coins in Babylon.js.
Coins created with PBR materials are displayed neatly.

Can you please make it so that they would fall in my wallet ![]()
If you tweet about it let me know we will retweet it frombjs account
This is gold ![]()
Thanks! Here is my tweet.
Havok physics seems to allow more coins to fall.
To enjoy the surface materials and the feeling that money flows into my direction, I modified your example a bit ![]()
Test of falling Coins with physics | Babylon.js Playground (babylonjs.com)
The feeling should be even better in XR!
through the coins make me think more of those delicious chocolate coins⦠![]()
I changed the coin into chocolate.
Unfortunately it didnāt look as authentic as the coin. Anyone know a technique to make chocolate look real?

@cx20 when i saw this example on my vr glasses i had to think of your gold rush demo. i am about to write the mentioned example in babylon but maybe you beat me to it. Unfortunately, to get into the enjoyment of the sham slingshot you need a vr controller: you hold in your hand bills that you can scatter around you. super cool feeling! ![]()
Unfortunately I donāt have vr glasses right now, so I donāt think Iāll port the three.js vr sample.
Speaking of which, if you ask ChatGPT GPT-4, they might be able to help you port from three.js to Babylon.js.
I impulsively wanted to try the ChatGPT port. Below is the result of porting.
VR feature is not built in (because I am not familiar with Babylon.js VR function)
Almost correct but I need an impulse upwards.
This example has still wrong impulse but it shows the right smooth behavour.
Babylon.js - make it rain | Babylon.js Playground (babylonjs.com)
This is what I want have:
Euro Geldschein Pistole selber bauen Geld werfer basteln aus Pappe - cardboard dollar money gun DIY - YouTube
⦠and nice to have: a flexible paper simulation
⦠and my money should stay on the ground, please ![]()
Fixed it a little. I think that changing CreatePlane to CreateBox solved the transparent problem.
Thank you, I can re-run the example all day long! ![]()
Perhaps if we start using Havok, we will be able to increase the number of bills.
BTW, Iāve noticed a problem with how coins are recycled after they fall below the ground. I think it could have been improved by:
/*
mesh.position = getNextPosition(50);
mesh.aggregate = new BABYLON.PhysicsAggregate(mesh, BABYLON.PhysicsShapeType.CYLINDER, { mass: 1, friction:0.4, restitution:0.8 }, scene);
*/
// Improved performance by referring to:
// https://doc.babylonjs.com/features/featuresDeepDive/physics/perfTips
const body = mesh.aggregate.body;
const pos = getNextPosition(50);
body.disablePreStep = false;
body.transformNode.position.set(pos.x, pos.y, pos.z);
body.setLinearVelocity(new BABYLON.Vector3(0,0,0));
body.setAngularVelocity(new BABYLON.Vector3(0,0,0));
Sure. Just change your prompt of āmaterial = chocolateā to āmaterial = swisschocolateā ![]()
Itās just a matter of having the right quantity of sugar, good quality milk and nicely roasted cocoa beans ![]()
Donāt ask for the recipe; Itās
secret
I think I got closer to the chocolate material thanks to your advice.

It was essentially a joke
. I only took two minutes twisting a few things in the materials.
I believe to make a realistic chocolate texture would require to create either a detail or clearcoat texture similar to a ārubber-likeā design. Choc is rarely just completely flat. Itās a liquid turned into solid and it does catch some of the light and env. It needs to look a bit more āorganicā.
I might have gotten another chocolate ball while trying the clear coat.
