Hi I’m new to unity, I am trying to get a platform to raise up once the player hits a cube.
I am using onTriggerEnter in C#, but it doesn’t seem to be working.
I have istrigger set on the cube and I have label the player with the “Player” tag, however nothing happens.
Here is my code:
using UnityEngine;
using System.Collections;
public class Lift : MonoBehaviour {
public GameObject bridge = null;
float temp;
void Start()
{
temp = bridge.transform.position.y;
}
void onTriggerEnter(Collider other)
{
if (other.gameObject.tag == "Player")
{
temp += bridge.transform.position.y + 10;
Debug.Log("Did you make it here?");
}
}
}