Open AnaCoda opened 2 years ago
Hello, I had the same problem and for me works when i set restitiution after load all html file via javascript. You can try with attribute restitution
var sceneEl = document.querySelector('a-scene');
sceneEl.querySelector("#a-plane").body.setRestitution(0.8);
Hello @martaquintana, setting restitution using setRestitution adds bounciness and not friction. What you're looking for @AnaCoda can be done using:
var sceneEl = document.querySelector('a-scene');
sceneEl.querySelector("#a-plane").body.setFriction(0.8);
Also, a pointer to keep in mind that if you're importing a gltf model then you should probably try to listen for the body-loaded event then do the above.
How can I change the friction coefficient when using the Ammo driver?
I tried as follows:
<a-scene physics=" driver: ammo; debug:true; debugDrawMode: 0; friction: 0.001;">
, but nothing seems to change no matter what value I put for friction.