My colliders are not interracting with eachother

I"m creating a simple mobie game and I’m trying to add collisions to it but when i add colliders to the car and the spike they doesn’t seem to interact with each other. I tried many options but nothing worked. Can anyone help me?
Here is the code for the car:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class CarCollisionScript : MonoBehaviour
{
    public void OnCollissionEnter2D(Collider2D collision)
    {
        Debug.Log("trigger");
    }
}

Here are the car and the spike and their colliders:




I have a resource for debugging physics messages, please go through the options and note that your spelling of the method is incorrect.

If you still have issues once that’s corrected the resource should be exhaustive, if there’s something missing I’d like to know!

it appears as though there is not a RigidBody on either the car, nor the spike objects.

the code

void OnCollisionEnter2D(Collision2D collision)
{
    
}

will not trigger unless one of the objects has a Rigidbody2D on it

If your collision methods are named correctly, and those events still don’t register collisions, make sure that one of your game objects has Rigidbody component attached.

This is a must for both Unity’s Physics2D and Physics system and it is mentioned in the docs somewhere. I don’t see any rigidbody components in your images.

See the docs:

Discussion:

https://forum.unity.com/threads/oncollisionenter2d-not-being-called.1266563/#post-8043773

if you can’t use RigidBody2D because it is to resource-intensive then i might try using Physics2D.Raycast() to check for collisions in every direction. however i think this may be more resource-intensive than just using RigidBody2D. so it seems as though: you are either making this game to be online multiplayer and there are hundreds of cars (in which case you should consider lowering the max players per game session), or your computer cannot handle the 2D cars you have , then I would consider upgrading to a better computer or lowering the number of cars. or if you’re saying that the platform that you are trying to be compatible with is incapable of handling the overhead of RigidBody2Ds i think that maybe you should not try to be compatible with that platform. (plus every newer platform that i am aware of should be able to easily handle the RigidBody2Ds). I don’t mean to say that there are tons of problems with what you are doing or that you are doing something wrong I am just saying some problems that i can think of that might be the problem you are having and some ways to possibly fix them. i hope this helps!