Skip to content

Instantly share code, notes, and snippets.

@Neill3d
Last active August 29, 2015 14:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Neill3d/130eb0c4768026ed4342 to your computer and use it in GitHub Desktop.
Save Neill3d/130eb0c4768026ed4342 to your computer and use it in GitHub Desktop.
MoBu OR SDK: working with constraint
// two ways for constraint creation
//
/// 1 - make it from constraint manager and show up in the scene constraints
pConstraint = FBConstraintManager::TheOne().TypeCreateConstraint( "Some constraint" );
/// 2 - make it for internal use (hiden from users)
pConstraint = new FBSomeConstraint( constraintName );
pConstraint->FBCreate();
//! in that case if we want to remove it, first of all remove all constraint references
pConstraint->Active = false;
pConstraint->ReferenceRemoveAll();
delete pConstraint;
pConstraint = nullptr;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment