All Classes Namespaces Functions Variables Enumerations Properties Pages
void AddMuscle ( ConfigurableJoint  joint,
Transform  target,
Rigidbody  connectTo,
Transform  targetParent,
Muscle.Props  muscleProps = null,
bool  forceTreeHierarchy = false,
bool  forceLayers = true 
)

NB! Make sure to call this from FixedUpdate! Creates a new muscle for the specified "joint" and targets it to the "target". The joint will be connected to the specified "connectTo" Muscle. Note that the joint will be binded to its current position and rotation relative to the "connectTo", so make sure the added object is positioned correctly when calling this. This method allocates memory, avoid using it each frame.