Quantcast
Channel: Latest Questions by Shiro_Rin
Viewing all articles
Browse latest Browse all 50

OnCollisionEnter stopped working

$
0
0
public void OnCollisionEnter(Collision col){ if (col.gameObject.CompareTag("Player")) { Destroy (this.gameObject); Debug.Log ("Exp Earned"); } } I'm getting incredibly frustrated about this. I've typed this same code millions of times over in other scripts and no problem. It's attached to a sphere with a rigidbody and a sphere collider. I'm using ufps controller. It should work, but it just doesn't. I end up just on top of the orb. I have no idea what is wrong with it

Viewing all articles
Browse latest Browse all 50

Trending Articles



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