Need to have a magnet object that sticks to nearest wall.
basically the object is invisible, it has the player’s x and z position, and clamped within the player’s height,
it’ll stick to any nearest walls/collider within a certain distance… and particular tag.
Perform a radial check using Phyiscs.OverlapSphere (Unity - Scripting API: Physics.OverlapSphere) to get everything in-range, and filter based on the object’s tag. Then knowing the nearby objects, choose one to stick to, do a raycast, acquire the point where the raycast hits the other object, then stick to that point.
Problem is that the objects now is pretty big… like environment… giant statues, walls…
To acquire that specific point to raycast? where? since the transfrom is located in the average middle of the concave mesh.
What i think i need is, acquire the nearest normals, even before the raycast so i can create a force using the negative normal… do you know how?