Quantcast
Channel: Latest Questions on Unity Answers
Viewing all articles
Browse latest Browse all 171066

Collision Detection Problem

$
0
0
Hi I have a quick question. I’m new to programming with unity3d, and would appreciate any advice that would help out with my problem. My collision detection is not working correctly. When my character (3rd person controller prefab) hits a sphere the level should restart, but instead the sphere just bounces off and the collision is not detected. How can I make the collision detection work? (The code below is attatched to the capsule collider on my character) void OnTriggerEnter(Collider other2){ if(other2.name == "Sphere"){ Debug.Log("hit the Sphere"); Application.LoadLevel(Application.loadedLevel); }

Viewing all articles
Browse latest Browse all 171066

Trending Articles



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