Hi How Can I Create An Endless DeathZone Which has a width but it’s endless from length sth like the one seen in 2dgameplay tutorial i read those but i found nothing Helpful can some one help me about that endless Bounds maybe?!?!
Kacer
2
You could have anything that moves beyond a certain point.
pseudocode:
if(transform.position.x >= 10){
Destroy(gameObject);
}
If you attach a script like this to an object it should be destroyed when it moves beyond 10x
nope i already have my deathZone which Says as soon as Player EnteredYourTrigger You Destroy it but I Want it to be Endless Bound like the one in the 2d gameplay tut!
fafase
4
OK , the lerpz tutorial HAS a box, a box collider exactly set to IsTrigger. That is what you want. You position your box which has bounds as it is a box and add this:
function OnTriggerEnter(other:Collider){
if(other.gameObject.tag =="Player")other.gameObject.transform.position =Vector3(0,0,0);
}
fafase
5
Ok, as I said the box is not infinite, it is actual not possible to do something like:
var box:BoxCollider;
function Start(){
box =GetComponent(BoxCollider);
box.size.x = Mathf.Infinity;
}
What you think is infinite is only real long, look at this:
[3045-screenhunter_92+aug.+25+10.53.jpg|3045]
this is taken out of the box, no change at all.