public Vector3 GetFacingLedge(Vector3 playerPos)
{
float distFromLeft = Vector3.Distance(leftLedge.position, playerPos);
float distFromRight = Vector3.Distance(rightLedge.position, playerPos);
if (distFromLeft > distFromRight)
{
return rightLedge.position;
}
else
{
return leftLedge.position;
} // checking for one can guaruantee the other's validity
/* maybe a UI popup on a valid spot
* could appear on fufilling climb
* conditions. *stretch goal*
*/
}

Leave a Reply