I created a scene in A-Frame using the "A-Frame Physics System" ( https://github.com/donmccurdy/aframe-physics-system ):
<!DOCTYPE>
<html>
<head>
<script src="aframe.min.js"></script>
<script src="aframe-extras.min.js"></script>
<script src="aframe-physics-system-master/dist/aframe-physics-system.min.js"></script>
</head>
<a-scene id="myscene" physics>
<a-entity camera="userHeight: 1.6" look-controls></a-entity>
<a-sphere color="red" radius="0.3" position="5 5 5" dynamic-body></a-sphere>
<a-sphere color="green" radius="0.3" position="6 5 5" dynamic-body></a-sphere>
<a-plane id="ground" height="200" width="200" rotation="-90 0 0" position="0 0 0" metalness="0" roughness="1" static-body></a-plane>
</a-scene>
</body>
</html>
The scene consists of two spheres and one plane. I want one ball to bounce more than the others when it hits a plane. I learned from the documentation that we can change properties, such as friction and restitution for the whole scene, using:
<a-scene physics="friction: 0.1; restitution: 0.5">
</a-scene>
But I want different values of friction and restitution for different areas. Please let me know if this is possible in A-Frame. Thanks in advance!
source
share