chandlerprall / Physijs

Physics plugin for Three.js
MIT License
2.77k stars 455 forks source link

Reuse of THREE.js materials in createMaterial causes wierd behaviour #284

Open EJTH opened 8 years ago

EJTH commented 8 years ago

Hi! I have had this wierd problem with a game I was making where a ball only had restitution applied when colliding with one of my wall objects.

I finally tracked the issue down to my reuse of THREE.js materials when creating the walls. I don't know if this should have been obvious to me. I don't know if this is expected behaviour, but now someone has a chance to find the solution. It took me a while to debug, because I just sort of hacked physijs code into the ObjectLoader from three.js which sort of worked, but not fully, until now :)