Hello, heads up I’m not a programmer
I’m determining an alpha (float) for distance along a spline based on character height within a trigger capsule to ascertain position of character relative to a spiral staircase for a (CCDIK effector) which works fine… except. The character has IK for the legs that make the “distance along spline” (based on current character height) - jump too dramatically when going up each step. Is there a better method of calculating player world location relative to distance along a spline other than character world z?
Direction vectors are a problem in this specific case as the spline spirals up and around itself as it is a spiral staircase as shown below.
I’ve thought about making more spline points and calculating spline by spline comparing right vectors for example. But I figure there is a much simpler way like intersecting capsules or using a trace to player.
The concept if you haven’t guessed already is to simply slide the hand along the railing as players go up and down - the up and down stairs and switching arms is taken care of with forward vector compared to “current” effector spline right vector (which is after the fact the alpha has been calculated). I’ve also smoothed out the alpha calculation by turning off IK and making a ramp - which is not ideal ofc. Any help appreciated - I think there is a simple math solution there somewhere.