Stefan Hedman

Results 144 comments of Stefan Hedman

Thanks man! I think your solution is equivalent to pointing to the most recent version on CDNJS. I never commit the build/ directly unless when making a new release. Pointing...

HTTPS all the things \o/ Don't think update or fork matters at this point. Maybe update, to keep the history on the same url base?

Hi, how about using a small maxForce on the DistanceConstraint? You could also use less stiffness. Experiment with those parameters and you should be fine:)

Of course :) Yes, just make the dragging force smaller. If you use a DistanceConstraint, then you can again use the .setMaxForce(maxForce) method. If the contact force from the static...

1. Yes, this is how the mouse constraint works in the p2 demos. Unfortunately there's no way to get a "follows absolutely and instantly" constraint. You could use a 2x...

Ok, then I understand :) Did you try using less gravity (or even turning off gravity for the body when mousedragging)? That may give you some more parameter tweaking space....

Good idea! I think the list could become pretty long and contain many game-genre specific things... Some things I'd like to add to the list: - **Use larger timesteps (fixedDeltaTime).**...

You could use [world.broadphase.aabbQuery](https://github.com/schteppe/p2.js/blob/718d2927877c6157daddb512e518176ff4360ee6/src/collision/SAPBroadphase.js#L148) to get all bodies overlapping the bounding box of your body. This should be faster than going through all bodies one by one directly. If you...

Can you debug it? Step into the bodiesOverlap method? If you want a quick fix, world.broadphase.aabbQuery should work, but you'll get some extra space around your circles...

Did you find a solution for this yet? Looking at your code, it seems like you use a new Narrowphase instance when you should use the one already existing in...