The box defined as a dynamic-body just doesn’t fall at all. I have tried downloading the minified JS provided in the github repository for the physics system, and changing my script tag to:
<script src="aframe-physics-system.min.js"></script>
This didn’t work either. I tried removing debug mode, which again didn’t work. I copy/pasted the HTML from one of the examples in the repository which also didn’t work on my system (no errors in the log) so I assume the physics system just isn’t getting imported for me for some reason.
I am running a local server to test the code.
What am I doing wrong here?
<script src="https://aframe.io/releases/1.6.0/aframe.min.js"></script>
<script src="https://unpkg.com/aframe-event-set-component@^3.0.0/dist/aframe-event-set-component.min.js"></script>
<!--PHYSICS ENGINE IMPORTED BELOW-->
<script src="https://cdn.jsdelivr.net/gh/n5ro/aframe-physics-system@v$npm_package_version/dist/aframe-physics-system.min.js"></script>
<body>
<a-scene physics="debug: true;">
<!-- MY CUSTOM CURSOR-->
<a-camera>
<a-entity cursor position="0 0 -1" geometry="primitive: sphere; radius: 0.005;" material="color: #000000; opacity: 0.5;">
</a-entity>
</a-camera>
<!-- BOXES-->
<a-sky color="#FFAA00"></a-sky>
<a-box dynamic-body position="-5 2.5 -6" color="red" scale="1 1 2" animation="property: rotation;
to: 360 360 0;
dur: 3000;
easing: linear;
loop: true;" event-set__enter="_event: mouseenter; material.color: blue;" event-set__leave="_event: mouseleave; material.color: red;">
</a-box>
</a-scene>