I got the following script:
function OnCollisionStay(explosion : Collision){
var platformName : String;
platformName = explosion.gameObject.name;
if(explosion.gameObject.name.Contains("platform")) {
if(gameObject.Find("/Field/"+platformName+"/CollisionDetector(Clone)") != null) {
Debug.Log("Stay:"+explosion.gameObject.name);
}
}
}
I want it so that, if the character is on the platform while the CollisionDetector(Clone) is there, it should do something. Currently, when the character is on the platform, it will only return a log message when the character is moving and not when it's standing still.
Does anyone know how to fix this?
Thanks in Advance