Stefan Hedman

Results 144 comments of Stefan Hedman

@bnolan Awesome! Please let me know how it goes. Can you point me to your fork if you start working on the new mesh shape? It was a while ago,...

@bnolan I added trimesh support along with plane collisions recently. No bvh structure yet though, but at least the basic stuff is there. https://github.com/schteppe/cannon.js/commit/b45172f1729431a08dabb4fe71b39054b5bc0094

Hi, what I think you need is to be able to disable the contacts just before they are solved. At the moment I don’t think it’s possible (unless you monkey...

did you check the raycast demo? You could raycast straight down and get the z position for the raycast hit.. this is probably the easiest approach. Or, you could use...

@Zbluu I think I’ve seen this before... could you double check if it’s fixed in the most recent version of cannon? (Run grunt to rebuild the repo)

Wow, awesome stuff! Thanks a lot!

How about something like this? ```javascript var bounced = false; body.addEventListener("collide",function(e){ bounced = true; }); world.addEventListener("postStep",function(e){ if(bounced && body.velocity.length() < 0.01){ console.log("bounced and stopped!"); } }); ```

postStep not triggering? I wonder why... Maybe you can try `body.postStep=function(){...};` instead? Body.velocity cannot be undefined.. if it was, cannon would not work. Maybe it’s the `body` variable? Replace it...

I see. If you need help with the cannon.js API in A-frame, ask in that repo. I don’t know how cannon is integrated into it.

From the docs: ``` Think of it as a door hinge. It tries to keep the door in the correct place and with the correct orientation. ``` ![hinge](https://user-images.githubusercontent.com/1063152/47962820-c3020700-e022-11e8-91d6-47f1f6060b10.jpg) It takes...