Question by
skully1333 · Feb 16, 2018 at 06:48 PM ·
collisioncolliderplayercollidersspherecollider
Sphere Collider not triggering scene reset on trigger,Sphere Collider not detecting collision on player
Hello,
I am working on my first game for my game development class and I am struggling with having my sphere collider reset the scene. I have a code that is working for only my box colliders even though I have the class set to be general colliders. And when I set the sphere to is trigger it falls through the map which is not what I want. I am not sure if I am missing anything. I have attached my current code for the functioning box colliders. I have searched around this form and was not able to find an answer the solved my question, but I do apologize if I just missed the form!
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Reset : MonoBehaviour
{
void OnTriggerEnter(Collider other)
{
if (other.tag == "Player")
{
Application.LoadLevel(Application.loadedLevel);
}
}
}
Comment