- Home /
Question by
sungodjelly · Jul 07, 2020 at 12:21 PM ·
collider3dcolliders
My 3D collider is not detecting colissions.
I have a sphere collider that is not trigger. Nothing is appearing in the debug log when I collide with it. I've tried to troubleshoot it but it's not working.
using UnityEngine;
public class playercollide : MonoBehaviour
{
void OnCollisionEnter(Collision collisionInfo)
{
if (collisionInfo.collider.tag == "Player")
{
Debug.Log("I collided with a player");
}
Debug.Log("I collided");
}
Comment
Answer by logicandchaos · Jul 07, 2020 at 01:19 PM
Do you have 3d colliders on both objects and a ridgidbody on at least one of the objects?
Your answer
Follow this Question
Related Questions
Can I make a hole in a mesh collider? 2 Answers
how to Stop Enemys from clipping into eachother? 0 Answers
3D game: Pickups don't disappear when player touches them. 4 Answers
3D Colliders isue 1 Answer
How Does OnTriggerEnter() Work? 0 Answers