Open Jantu82 opened 3 years ago
Restitution with ammo.js is zero by default which requires every object in collision to be given explicit value.
Example below uses a ball and floor:
AFRAME.registerComponent("do-something", {
init: function () {
var sceneEl = this.el;
var floorEl = sceneEl.querySelector("#floor");
var ballEl = sceneEl.querySelector("#ball");
floorEl.body.setRestitution(0.9);
ballEl.body.setRestitution(0.8);
},
});
<a-scene do-something>
Is it possible to change the restitution (bounciness) somehow when using ammo.js with aframe physics system?