As title says, I have a scrolling camera but when camera box collider hits otherobject i’d like it to stop movment, but i’m nto entirely sure how to go about this, any ideas would be great.
var speed : float = 0.5;
function Update () {
transform.Translate(Vector3(0,speed,0) * Time.deltaTime);
}
function OnTriggerEnter(otherObject: Collider){
if(otherObject.gameObject.tag == "cameracollision"){
transform.Translate(Vector3(0,0,0));
}
}
Thank you