Re: Physics Patch-a-Day Thread – Join the fun!!!


Forums > Jitter > Physics Patch-a-Day Thread – Join the fun!!!
September 25, 2012 | 11:50 pm

Today's fizzy patch-a-day explores the use of the jit.phys.body object to create non-rectangular bounding regions for rigid bodies.

It uses the matrixoutput attribute of the jit.gl.gridshape object to feed into the jit.phys.body object, but any 3 plane float32 matrix can be used. By setting the shape attribute to concave, we can place objects inside the rigid body, allowing us to contain objects within any type of static or even dynamic bounding space. While this example is not perfect (some objects have a tendency to escape!) I found the implications very exciting.

Some things to play with are: the xfade amount between the primary gridshape and noise; selecting different gridshapes as boundaries; showing and hiding the bounding form and vector indicators using enable on the jit.gl.physdraw object; the difference between concave and convex hulls; amount of gravity; your own dynamic meshes (3 plane, float matrices).

Have fun!

-Cory

[attachment=204610,4452]