I've been trying this code out. Which so far is the ONLY one I've been able to get any headway with. But what happens is, is that if I press Jump repeatedly I will eventually get to the top of the ladder.
Secondly, I am now able to climp terrain sloaps that are very steep which I DO NOT WANT! How can this be fixed?
That 2nd Debug does NOT seem to get called for some reason when I exit the ladder?
function OnTriggerEnter (other : Collider)
{
Debug.Log("Was Triggered");
if(other.gameObject.tag == "ladder")
{
transform.GetComponent(CharacterController).slopeLimit = 99;
transform.GetComponent("CharacterMotor").sliding.enabled = false;
}
}
function OnTriggerExit (other : Collider)
{
Debug.Log("Was a ladder");
if(other.gameObject.tag == "ladder")
{
print("leaving ladder");
transform.GetComponent(CharacterController).slopeLimit = 45;
transform.GetComponent("CharacterMotor").sliding.enabled = true;
}
}