Ohhh, nice game! Thanks so much for using my asset pack. You're the first person I've seen who used it in a real game :D
zLizard
Creator of
Recent community posts
Thanks for checking out my game!
I never thought of using rigidbodies that way, im sure it made the collisions easy to add.
My snake is completely transform based, and is attached together using a bit of math.
Similar to you, i have a bunch of segments, the head, middle segments, and the tail. I put all of them in a class
Ill try to explain as best as i can.
Basically, its a big chain of connected points. Each point is confined to another via a distance constraint (takes the distance between one point and another, and normalizes it). If one point moves, the rest follow it. Its pretty simple on its own, but i also managed to add angle constraints for each individual segment, so the snake cant turn on to itself too weirdly.
And thats pretty much the concept, all i have to do is move the head and the rest of the body follows smoothly. It is a bit more complicated in code, especially with the angle constraints, though.
One problem with transforms, i couldnt get collision physics to work, so i just changed the angle when the snake hits a wall.
Thanks for sharing :) nice to see how other people do it
np! Also, if you want to keep that mechanic, it wouldn't hurt to have a little white outline indicator around the molecule that the player is going to pick up. It might be better than just clicking. I feel like accidentally pushing the molecules out of orbit when trying to pick them up is part of the gameplay




