I have this script:
var ForceX : float = 0;
var ForceY : float = 2;
var ForceZ : float = 0;
var positionx : float = 0;
var positiony : float = 0;
var positionz : float = 0;
function FixedUpdate () {
if(Input.GetKey(KeyCode.Tab)){
rigidbody.AddForceAtPosition(Vector3(ForceX,ForceY,ForceZ), Vector3(transform.position.x - positiony, transform.position.y - positionx, transform.position.z - positionz));
}
}
This is supposed to fin the position on the object, then addforce at that point. But the weird thing is, no matter what i set the values too, it doesn’t work. Any ideas?