What i want to do is to rotate the cube2 when the cube1 collides with it, i know i could put the script on the cube2 and test if they are colliding, but with all the thigns i will have it won’t be possible to do that, and i want to know how i would do that, cuz in my point of view it’s a important thing to know.
Basically i have this javascript script on cube1:
function OnCollisionEnter(col : Collision){
if(col.gameObject.name=="cube2"){
Debug.Log("Hit Something");
}
}
Probably i’ll use transform.Rotate, but i need to tell the program that is the cube2 that needs to rotate and not the cube1.
Thanks!!
Thanks jgodfrey helped me a lot :)
– didabig