Sixze / ALS-Refactored

Completely reworked and improved C++ version of Advanced Locomotion System V4.
MIT License
943 stars 261 forks source link

Feet Ik has different behaviour on ramp corners #538

Closed jomath229 closed 1 month ago

jomath229 commented 1 month ago

If we climb up a ramp with a 90 degree edge, the pelvis offset is going to be based on the lower foot which will trace the floor or the void. If we creep up on the ramp while keeping one foot outside of it, the body will keep an offset to the foot that's outside the ramp and since the hit is lower or it hits nothing, it will take into account the lower foot for the pelvis offset and we get this:

image note that the trace hits nothing here.

To the contrary, if we already are on the ramp, and we place one foot outside of it, the pelvis offset will remain correct with one foot floating in the air and the other being on the ramp:

image

The arrows are simply to show the movement direction to get in the situation.

I'd expect the pelvis offset to go back up once the foot trace hits nothing like in the second picture and while it hits something, we should have the result of the first picture. The problem is that if we keep climbing on the edge, when nothing gets hit, we still remain with one leg dangling off the edge.

jomath229 commented 1 month ago

Potential fix pr:539

Sixze commented 1 month ago

I have merged your PR, it seems to be the right solution to this issue.