Id say this is a continuation of this thread right here
I am making a mini project, its a platformer game. I want to add a rail grinding system similar to the sonic games but I have no idea how to. This thread looked helpful but I didnt really get what they were saying. I tried to make the basics of the rail grinding system the way i understood it and it doesnt work at all. Also I need to put these questions in the equation:
How would i rotate the character based off the rail?
How would i connect multiple rails to another?
Why dont you have attachment points on the rail, and then when a player wants to start rail grinding, you just put them at the closest attachment’s position then just move them to the next attachment position
i thought about doing something like that, but how would you start rail grinding on a specific position of the rail?? also how would you rail grind backwards of the rail?
You could get the direction in which the player is facing and then the direction of the closest attachment, get the dot product of those two vectors then itll tell you how close or far they are facing from each other
And maybe as they are on the rail and moving you can check the attachment they are closest to change directions mid railing
thank you! I havent been able to do the method that has been recommended to me cause of school and im also working on other projects. Ill try to study your code to see how everything works when its done. Thanks again!