Question by
Otaku_Riisu · Jul 02, 2016 at 10:30 PM ·
c#collision3d
Unity3d OnCollisionEnter not firing
I made a simple script to detect collisions, but it doesn't appear to be working. The collision doesn't seem to be acknowledged whatsoever.
using UnityEngine;
using System.Collections;
public class Pickup : MonoBehaviour {
// Update is called once per frame
void onCollisionEnterEnter (Collision col){
if(col.transform.tag.Contains("Weapon")){
Debug.Log ("Poke");
}
}
}
Both the objects have colliders and rigidbodies. I cant seem to figure out why this isnt working. onTriggerEnter doesnt work either, even if one of the objects is set to be a trigger.
object to collide with- http://i.imgur.com/0Lc3wwb.png
character- http://imgur.com/1FmftmT
Comment
Best Answer
Answer by Soos621 · Jul 02, 2016 at 11:16 PM
Your on collision enter function isnt capitalized replace onCollisionEnter with OnCollisionEnter
Thanks, That was really stupid of me ^^; Sometimes it takes a fresh set of eyes to notice the little things