I know this has probably already been answered, but I still can’t figure this out. I’ve been running this code:
#pragma strict
public var target : Transform;
function Update () {
transform.rotation.x = target.rotation.x;
transform.rotation.y = target.rotation.y;
transform.rotation.z = target.rotation.z;
transform.position = target.position + target.position(-3,-1,0);
}
And it gives me this error:
It is not possible to invoke an expression of type 'UnityEngine.Vector3'.
The thing is, this code works when I replace :
target.position(-3,-1,0)
with :
Vector3(-3,-1,0)
Thanks if you can help!
Fahim,