Getting 3D slide direction

Godot Version



I am trying to make my player slide down a curve (like a water slide) and so far I’ve managed to get the slide direction using the following code

        float distance = point.Dot(planeNormal);
        return point - distance * planeNormal;
        var slideDirection = MainUtils.ProjectOnPlane(Vector3.Down, Core.GetFloorNormal());

This works, but the problem is that sometimes the slide surface tilts. I don’t know if that’s the right word for it, but I hope the image below helps.

So, how do I maintain the desired sliding direction (the green line) even in this cases, ignoring the orange directions?