The script does not catch OnTriggerEnter2D

I’m new in Unity. I’m trying to make a Ping-Pong game. I have no triggering when the ball hits the player and the ball flies further away.

Player And Ball settings

And ball code script:

void OnTriggerEnter2D(Collider2D other)
{
    if (other.CompareTag("Player"))
    {
        Debug.Log("Triggered by Player");
    }
}

Kinematic do not produce any interaction with other Kinematic or Static i.e. no callbacks. This is what the “Use Full Kinematic Contacts” is for. Turn that on. Note that you’ll never get a collision response from a Kinematic. If you need an actual collision response then use Dynamic as that’s what it’s for.

Hello @LemonLimon4ik,

I can see that the Rigidbody2d Body Type is kinematic so I guess you don’t move the ball with physics
It depends how you move the ball, if you use something like this.transform.position = ... then it doesn’t use physics so it won’t trigger anything, but if you use the gravity or an interpolation of the rigidbody then it will work.

(a box collider on a ball? :laughing:)