n5ro / aframe-physics-system

Physics system for A-Frame VR, built on CANNON.js.
https://n5ro.github.io/aframe-physics-system/
MIT License
507 stars 137 forks source link

applyImpulse not working after aframe upgrade #126

Closed nirajupadhyay11 closed 5 years ago

nirajupadhyay11 commented 5 years ago

Hello,

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 but now I see this message in console log -

image

nirajupadhyay11 commented 5 years ago

Closing it as raised the same question on SO -

https://stackoverflow.com/questions/55238394/aframe-physics-system-with-aframe-0-9-0