cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv headernumbered-list123split-screen
user profile image

This is my JS adaptation of Box2D lite, originally written in C++ by Erin Catto.

Comments

  1. How does Box2D differ from your Verlet physics stuff?

  2. @osublake Box2D implements true rigid bodies. Rigid bodies are defined by a shape, their center position + rotation angle, and linear + angular velocity. Velocity impulses are used for penetration resolution. See this page for more info https://code.google.com/archive/p/box2d/downloads (the powerpoints).

    Verlets approach is very different, bodies are made of points connected with contraints links (4 points and 6 links for a box), and cannot be totally rigid. Velocity is implicit, positions are modified directly. See here for a better explanation: http://www.gamedev.net/page/resources/_/technical/math-and-physics/a-verlet-based-approach-for-2d-game-physics-r2714

Leave a Comment Markdown supported. Click @usernames to add to comment.

You must be logged in to comment.
Loading...
Loading...