Thanks for the fast reply.
The problem was not to rotate the steering wheel via script automatically. This worked fine with the transform.Rotate(20*Time.deltaTime,0,0); Method as well as with your Transform.RotateAround() solution.
But I think I fixed my problem anyway.
Now as it is every time developing a new problem appeared. Because I don´t use the GrabbingHand Script anymore I can grab anywhere I want to rotate the steering wheel. But I just want to allow to rotate the steering wheel when the hands actually grab it. I tried to handle it with collision detection, but because my Script is attached to the steering wheel Object it seems hard to detect a Collison between the Hand and the steering wheel.
What I tried:
void OnCollisionEnter (Collision col){
isCollisionDetecetd = true;
Debug.Log ("Collision Enterd" + isCollisionDetecetd);
}
void OnCollisionExit(Collision collisionInfo) {
isCollisionDetecetd = false;
Debug.Log ("Collision Exit" + isCollisionDetecetd);
}
And allow the grabbing/rotation just when the isCollisionDetected Variable is true. But it doesn´t even set the variable to true. I know that it allows every Collison but cause of the fact that just the hands can collide with something this should be right.
Am I doing something wrong?
Thanks in advance