Quantcast
Channel: Questions in topic: "stackoverflowexception"
Viewing all articles
Browse latest Browse all 18

for loop causes StackOverFlowException

$
0
0
Hi, I create this for loop, but for some reason it gives the error "A StackOverFlowException has occurred". I really don't know anything about this error, nor do I know how to produce it. for (var hit : Collider in colliders){ if(hit.rigidbody){ hit.rigidbody.AddExplosionForce(explosivePower, transform.position, explosiveRadius, 1.0); } var dist = Vector3.Distance(transform.position, hit.transform.position); var linearEffect : float = 1.0 - (dist/explosiveRadius); if(applyExplosiveDamage){ hit.gameObject.SendMessage("ApplyDamage",damage*linearEffect, SendMessageOptions.DontRequireReceiver); //hit.gameObject.SendMessage("ApplyDamage",damage*linearEffect, SendMessageOptions.DontRequireReceiver); } } I really hope there are some talented people out there who can help me.

Viewing all articles
Browse latest Browse all 18

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>