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;
}
}