My Snake Game has a flaw. How do I solve it best?

I am attempting to create a version of the game Snake for a course I am taking but I’ve gotten stuck on an unexpected issue.

When my “snake” (the sphere) attempts to move from horizontal to vertical the tail (tiny cube) for a fraction of a second will occupy the same space as the head which as anyone who played the original version on their Nokia means Game Over.


I need a way to make the tail not collide with the main head of the snake.

I’ve tried to the best of my ability to follow this tutorial but perhaps due to it being for UE4 it’s not working as well for UE5 (or at least that’s excuse I tell myself)

But then you cannot lose, right? Anyway, have the snake body ignore head collision.

Well, yes, I probably could have worded that better XD.

“I need a way to have the head not bonk into the body upon turning.”

I’ll give the Collision filtering a go. Is there a smooth way to have it be unable to collide for a second upon turning?

You may get away with simply disabling tail collision, and restoring it after x seconds:

Collision filtering offers more granularity but perhaps it’s an overkill.


This is how my movement works, feels like the sanest way to insert the code into but I can’t get it working smoothly, do you have any other tips on where inserting it might work better?

What does it mean?