I have a joint motor going.This is the script im using to activate the joint motor to rotate my object
function Update() {
if (Input.GetKey("o")) {
hingeJoint.useMotor = true;
} else {
hingeJoint.useMotor = false;
}
}
What i want to do is when i release “o” it stops the joint motor(witch i already have in my script)but instead of the object just rotating back around i want it to stop in the position i release the key stroke at.
Im creating a piece of machinery and machine when they say lift something with their arm the arm stops in the position they released the joy stick at.
Thanks