Wednesday, November 14, 2012

nIce
Got the btGeneric6DofSpringConstraint working.  Easier than I expected.  I thought I had to manually update the new pivot point each time the cube moved, but no.  Just added the constraint with a pointer to the rigid body and it stuck.  Had to fiddle with the values of spring stiffness and damping a bit but I'm quite satisfied with the feel of cube control now.  The cube bounces off surfaces with a physics feel, but the angular limit constraints keep it from wheeling out of control, and the springs bring it back to equilibrium nicely. 
     Next up is creating that threshold, where if you hit a surface too hard too fast you lose control, the limits turn off and the cube fractures...  fun stuff.

No comments:

Post a Comment