Greetings,
What is it that I am trying to accomplish?
I am trying to destroy a gameObject, when I am colliding whit it using the “Unity3D, FPS prefab (whit absolutly NO tweaks)”!
What have you done so far to make this work?
The gameObject I want to be destroyed, have RidgedBody on it, and the following code on it;
void OnCollisionEnter (Collision myCollision) {
if(myCollision.gameObject.name == "myGameObject") {
Destroy(this.gameObject);
}
}
What is working, and whats not?
It works perfectly when ever something else then the FPS is colliding whit it, but NOT when the FPS is… (I was testing whit debug logs, to check if the code even triggered, which it did, so…)!
I have done this SO many times before, so I know this should work… I usly dont go to forum or anywhere else for help, since the Unity3D Script Reference is more then enought to get help, but when I know I am doing it right, and it doesnt work, I have no choich then to go here…
I hope someone can help me whit this issue,
Best Regards,
Winsj