- Home /
Spike Player Die
I've been making a 2D action platformer with a spike that kills the player. I've tried many different 2d trigger and 2d collider events with no results. I want to have the player hit the spike and switch to scene 3, a gameover screen. Here's my c# code, any help at all is appreciated! using UnityEngine; using System.Collections;
public class Spike : MonoBehaviour {
void OnCollision2D (BoxCollider2D Spike){ Application.LoadLevel("3"); } }
Comment
Your answer
Follow this Question
Related Questions
How to use Physics2D.IgnoreCollision2D in Unity 5 to cancel a trigger 0 Answers
Detect a collision point, but allow pass through collider. 0 Answers
Cirlce Colliders 0 Answers
Collision returning an error 0 Answers
Collider2D/RigidBody2D not working 1 Answer