I’m trying to create a rail that will capture the player when they touch it, so they can only move along the rail until they jump off. Similar to grinding in Tony Hawk or Crash Bandicoot 4. For some reason, as this is set up now, the player will always move up to the highest point on the rail. Why is this happening?
Hey @sweeetjd!
It doesn’t look like an issue with your code there, it’s relatively simple and seems set up perfectly! Can you explain what you mean when you say “highest” point on the spline? You do mean highest in the Z axis, right?
Something to keep in mind is that when using a capsule component, it’s drawing from the middle. Maybe use Current location’s Z minus half of the capsule height when looking for the closest point in world space?
I was using a spline mesh underneath the spine to provide support. Offsetting it from the spline half the character height did the trick, thanks.
1 Like