Hi everybody!
I have a character that is in free fall along with some enemies, such as the rate of decline is high, I had to speed up shot of the characters, conclusion, the bullets go into the model of the character without colliding, ie bullet through the character without causing any damage. =(
I am using the following script for the calculation of impact
var explosion : GameObject;
var timeOut = 3.0;
var explosionning;
var explosionSound : AudioClip;
var gui:Texture2D;
function Start () {
Invoke("Kill", timeOut);
}
function OnCollisionEnter (collision : Collision) {
var contact : ContactPoint = collision.contacts[0];
var rotation = Quaternion.FromToRotation(Vector3.up, contact.normal);
Instantiate (explosion, contact.point, rotation);
Kill ();
}
function Kill () {
Destroy(gameObject);
AudioSource.PlayClipAtPoint(explosionSound, transform.position);
var player:guiDano = GetComponentInChildren(guiDano);
player.DoFade(gui, 1.0);
}
@script RequireComponent (Rigidbody)
Please Help me
!!!