i make a two animations rope clime up and clime down how to set script Input.GetAxis("Vertical"); up and down two animations
if (onRope) { playerTransform.position = collidedChain.position; playerTransform.localRotation = Quaternion.AngleAxis(direction * 90, Vector3.forward);
if(Input.GetAxisRaw ("Vertical") > 0 && chainIndex > 0)
{
timer += Time.deltaTime;
if (timer > climbUpInterval)
{
ClimbUp ();
timer = 0.0f;
}
}
if(Input.GetAxisRaw ("Vertical") < 0)
{
if (chainIndex < chains.Count - 1)
{
timer += Time.deltaTime;
if (timer > climbUpInterval)
{
ClimbDown();
timer = 0.0f;
}
}
else
StartCoroutine(JumpOff());
}
if (Input.GetButtonDown ("Jump"))
{
StartCoroutine(JumpOff());
pControl.jump = true;
}
}
Comment
Your answer
Follow this Question
Related Questions
8-way 2D top down movement (diagonal) idle animation issues 0 Answers
How can I animate UV offsets of multiple materials? 0 Answers
Specific key combination not working 0 Answers
Input script 1 Answer