Closed nirajupadhyay11 closed 5 years ago
I'm not sure how to reproduce this – the stress.html
example uses applyImpulse
and still seems to work in aframe 0.9.1, would you be able to share a running demo?
Here is a codepen - https://codepen.io/nirajupadhyay11/pen/wbyodL
A-frame version is currently 0.8.2 and everything works. But, if you go to HTML settings and change the version to 0.9.0, it stops displaying
In the JS console there is a warning:
core:a-node:error Failure loading node: Error: "Unknown geometry schema `undefined`"
I think this means that A-Frame 0.9.0 requires you to do geometry="primitive: box"
instead of geometry="box"
, or the box will not be created.
I upgraded to aframe 0.9.0 with aframe-physics-system v3.3.0 and applyImpulse seems to be broken after that. I upgraded from aframe 0.8.2 and aframe-physics-system 3.3.0 where all was working fine.
Here is my code -
entity.setAttribute('dynamic-body', true); entity.addEventListener('body-loaded', function () { setTimeout(function () { let pStart = new CANNON.Vec3(); let force = pStart.copy(attachment.object3D.getWorldPosition()); force.scale(140, force); entity.body.applyImpulse(force, entity.body.position); }, 0); })
It used to work perfectly fine in aframe 0.8.2 but now I see this message in console log -