Actual name of target velocity?

Ok, so I’m trying to directly modify the target velocity of a hinge joint (HJ). I’ve tried a few things like “HJ.TargetVelocity = 500” and “HJ.targetVelocity = 500” and “HJ.Target Velocity = 500”… You know the routine.

So, what is this variable actually called? I know there are some texturing variables that have different names in the code than what shows up in the inspector. Here’s a snippet if it helps understand my question.

var firing : boolean = false;
var HJ : HingeJoint;

function Start () {
HJ = gameObject.GetComponent (HingeJoint);
}

function Update () {

if (firing){
HJ.targetVelocity = 500;
}

else{
HJ.targetVelocity = 0;
}


}

The docs only mention a velocity variable.

http://unity3d.com/support/documentation/ScriptReference/HingeJoint-velocity.html

AHA!
I found it. Here’s the correct code.

function Start () {
HJ = gameObject.GetComponent (HingeJoint);
}

function Update () {

if (firing){
HJ.motor.targetVelocity = 500;
}

else{
HJ.motor.targetVelocity = 0;
}


}

As you can see, I just needed to add the .motor. , and use the normal scheme of lowercase, then capitals. Duh. Oh well, I’ll leave this up, maybe it will help someone else.