Hello, im pretty new to this, I have googled and tried so many ways, but I cant figure it out.
This is the code I have:
function OnTriggerEnter (other : Collider) {
ball = GameObject.FindWithTag ("Player");
ball.rigidbody.AddForce (-1000, 0, 0);
}
this actually works. as long as ball does not rotate the axis X Y.
My questions are:
1- can I use the local axis from the box collider (in this case I want Y local) to say, Ball you will get force from the Y axis of the boxcollider.
I have tried relativeForce and without success.
2- even switching off the collider, the force still exists even though I added only on the onTriggerEnter. why?
many thanks in advance.
↧