Jello Physics 1.24

Jello Physics now has better collision detection, better support for RageSpline, and a smarter editor.

Collision Detection

Previously, Jello Physics relied solely on penetrating points for collision detection. Now, a hybrid between calculating time of impact and penetration is used. This solves the problems with micro sliding along the tangent.

First penetrating points are found, then time of impact for each is calculated. Next the movement along the tangent is evaluated, and if it is too large (greater than JelloWorld.TangentPenetrationThreshold) we rely on the penetration method for collision detection. Note that JelloWorld.TangentPenetrationThreshold along with JelloWorld.PenetrationThreshold should be modified to match the scale of your project. In other words, if you use cubes that are 1x1, the defaults should work fine, but if you are using cubes that are 100x100, then you will need to increase these values in the editor.


RageSpline itself is a bit buggy since Unity 4.0. It doesn't work right when you try to have an offset border with anti aliasing. Well the RageSplineMeshLink will fix that for you. You may notice that the editor may switch back and forth between RageSplines refreshed mesh and RageSplineMeshLinks refreshed mesh, but do not worry because it will use the RageSplineMeshLinks version at runtime.

Landscape is also now supported in Jello Physics!

Smart Editor

The editor will try and retain as many subcomponents as possible when you add/remove points(edge and internal) to the shape in the editor. For example, lets say you have a five point mass JelloBody and you set the mass of the 3rd point mass to seven where as the rest are all one. Now you delete the 2nd point mass. With the old editor, you would now have a four point mass body all with a mass of one. With the new editor, you would now have a four point mass body with point mass numbers 1, 3, and 4 with a mass of one and point mass number 2 would have a mass of seven.

Change Log

Here is the full change log for JelloPhysics 1.24


consists of 1.24b1 through 1.24b6.


bugfix: RagesplineMeshLink now correctly calculates edge normals.


bugfix: CircleCollider2d collisions work correctly again. Note: circle colliders will still suffer from micro sliding (I have not been able to successfully calculate circle vs line segment time of impact).
bugfix: misc RagesplineMeshLink fixes.
bugfix: misc JelloJoint fixes.
added: JelloMathTools class.
added: SolveQuadratic() method to assist in the time of impact collision calculations.
added: Smart editor support! The editor will try and retain as many subcomponents as possible when you add/remove points(edge and internal) to the shape in the editor!
added: smartSetShape() method to help retain information subcomponent information.
added: smartRemoveInternalPointMass() method to help retain information subcomponent information.
added: smartAddInternalPointMass() method to help retain information subcomponent information.
added: SmartShapeSettingOptions enum.
added: Ragespline landscape support!
note: Ragespline has errors in its own code that screws up any offset outline with anti aliasing, but jello physics will repair the outline when you press update and when you press play.
note: Ragespline free outline, beak, and emboss still not supported.
note: Ragespline normals may be slightly off when using Physics normal offset.


bugfix: corrected the JelloBody.derivePositionAndAngle() method. It will now correctly give rotations near 180 degrees. This fix may especially help you if you experienced odd rotation effects with bodies that had shape matching enabled.


bugfix: sleeping bodies now sleep.
bugfix: improved JelloContact.hitPoint accuracy.
bugfix: removed "micro sliding" that made bodies slide along an edge.
added: JelloWorld.TangentPenetrationThreshold (has to do with collision detection.)
changed: Modified BodyCollide and ApplyCollisionImpulse to accept new collision detection method.
added: JelloContact.mtv (minimum translation vector for collision resolution).
added: JelloWorld.wakeVelocity.
added: JelloWorld.wakeAngularVelocity.
added: SupplementaryColliderInfo.PrevColliderVertices to assist with collision detection.


bugfix: RageSplineMeshLink now ensures polygonCollider2D.isTrigger is set to true.


change: Rigidbody.Inertia now used in collision response (Unity 4.5 and up) against non static non jello colliders.
bugfix: Jello World objects no longer duplicated and left in the scene when exiting play mode (should also solve crash on scene change).
bugix: Jello World will remove invalid JelloJoints and JelloBodies automatically.
change: Not removing JelloBody from world in OnDestroy() any more, please use JelloBody.Destroy().

September 12th, 2014