Stefan Hedman

Results 144 comments of Stefan Hedman

Hi, For many cases, your code should be fine. If you use interpolation, sleeping, or if you have custom force fields, you might want to add some more stuff. Here's...

@ioquatix I made a serializer for p2.js, but I removed it after a while. It's a bit of work to maintain it, and in the end I realized that it's...

@ioquatix All right. It should work perfectly for a single body without contacts. If you have contacts you should probably not touch the position or velocity. Maybe you can add...

Yes, I agree that both should be the same order by default. Or maybe toEuler should be removed? if you’re using quaternion to euler, in my experience something might be...

There is a hello world tutorial here: https://github.com/schteppe/cannon.js/wiki/Hello-Cannon.js%21 And an FPS demo using threejs here: http://schteppe.github.io/cannon.js/examples/threejs_fps.html

If it’s about applying a custom force, Cannon.js can definitely do it, as you have already figured out. The question is what that force is... I was first thinking about...

Hi. Can you post some code so we can reproduce the problem?

Zero restitution means that the library will *try* to get no bounce, but it will most certainly never get a perfect result. You can try experimenting with simulation parameters to...

@brundonsmith weird bug... did you find out what the problem was? Is there a live demo that demonstrates the issue? Can you reproduce it in one of the cannon.js demos?...

Won't change position: - Static bodies - Sleeping bodies - Dynamic and Kinematic bodies with velocity.length() == 0 The rest will update their position. Same goes for angularVelocity + quaternion....