n5ro / aframe-physics-system

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

Setting restitution of individual objects #115

Closed rmr-code closed 5 years ago

rmr-code commented 5 years ago

From what I can see, the restitution property is set at the scene element. Can we not set it for an individual entity (I tried it didn't work). So in case we need different bounces for different entities are we to code them using the cannon.js integration as mentioned in the docs? Thanks

donmccurdy commented 5 years ago

Currently they are at the scene level. The way to expose them, I think, would be through a physics-material or contact-material component, as proposed in https://github.com/donmccurdy/aframe-physics-system/issues/54. But so far I haven't had the time to do that sorry.