You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 23, 2024. It is now read-only.
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.
The text was updated successfully, but these errors were encountered:
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.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
The text was updated successfully, but these errors were encountered: