I have an algorithme to find.
I have a player in a 3D space on a random planet. My goal is to have an oriented gravity toward my planet. And when I jump: Find the right normal direction.
As you can see, the gravity must NOT be depending on the Normals collision, but must depend on this gravity point, line or quad I place in the Level Design
(see the 2 cube at the bottom of the planet, the jump of the player must NOT depend on the normal of collision (orange arrow), but must depend on the red arrow)
I have to find out depending on the position of the player, if the gravity will depend on the closest Gravity Point attractor, OR the closest line, OR the quad's normal direction. Here a real screenShot exemple:
I want this algorithm to be dynamic enough to be able to place points, lines or quad in the LevelDesign as I want. This algorithm will be called at each frame when the player is in the air.
And here an exemple of the most complexe shape I would like to manage: