I want to make a javascript for my bullets to destroy on anything. In some video’s they say to destroy it after time, but i want it to destroy after collision! Have someone a script!
please place it here or email it to ***
I want to make a javascript for my bullets to destroy on anything. In some video’s they say to destroy it after time, but i want it to destroy after collision! Have someone a script!
please place it here or email it to ***
function OnCollisionEnter(collision : Collision) {
Destroy(gameObject);
}
That’s very basic stuff. I recommend to read some documentation before posting questions like this (-1).
Sorry, im really new and dont know javascript very well!