Skip to content

Instantly share code, notes, and snippets.

@mmmovania
Created March 31, 2014 13:57
hkpStiffSpringConstraintData* spring = new hkpStiffSpringConstraintData();
// Create constraint
spring->setInWorldSpace(movingBox->getTransform(), fixedBox->getTransform(), pos2, pos1);
// Create and add the constraint
{
hkpConstraintInstance* constraint = new hkpConstraintInstance(movingBox, fixedBox, spring );
g_pWorld->addConstraint(constraint);
constraint->removeReference();
}
spring->removeReference();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment