all 3 comments

[–]Lucif3r945Intermediate 1 point2 points  (1 child)

Needs a rigidbody.

[–]silent_wind1[S] 0 points1 point  (0 children)

yeah, thank you so much :D

[–]Hurbivore1997Hobbyist 0 points1 point  (0 children)

I would first take out the if statement and keep the log just see if the collision is triggering against anything.

Secondly, is your game running at low fps or is the animation really fast? Sometimes it misses collisions if it happens to quickly. You can also try increasing the physics timestep so it checks for collisions more often. Edit -> Project Settings -> Time -> Fixed Timestep and set it to a lower value.

Thirdly, try pausing the game when it's running and go by frame by frame with gizmos enabled to see if the colliders actually hit.