What do you want to achieve? Keep it simple and clear!
The Current Movement:
What i want to make it like:
i want to create a movement like slither io, but in this case im using the HumanoidRootPart as the snake controller. Since the character can move freely without certain limits as shown in the video, i dont have any ideas on how to limit the characters movement like in the slither io example. How do i make a limit so the snake wont touch itself like in slither io.
you could update the snake’s position only while a movement key is down, and you would have a unit vector dictating what direction the snake is moving in. Every time the snake moves, it should move in that unit vector. To change the unit vector, you could have the WASD keys lerp the unit vector towards the direction of the input. Doing this should produce a gradual turning effect like in the video
I did this using something called procedural animation, I’ll share the script when I get home
But basically, this utilizes the fact that if you, for example, turn the HRP 25 degrees on the Y axis, if you turn the Motor6d on the tail -25 degrees (the opposite direction), itll be facing the same way as if the HRP didn’t turn at all.
Multiply this degree offset by the difference between rotations between the rotation on the last frame and the rotation on the current frame, and clamp it to -0.25 → 0.25 to prevent tail curling, and decrease the effect for body segments closer to the HRP, and you’ll get the tail turning effect you want