New Input System Adding more to it
I'm using the new input system which I think is just awesome, however in my game I need the character to be able to climb a ledge and with the new input system, i have no idea how to implement that kind of script or action. I tried a google search for a simple climb script but when I implement it, a consol error comes up saying "Character Controller.Move called on inactive Controller?
here is the script I'm trying to use.
Transform chController; bool inside = false; float heightFactor = 3.2f;
private CharacterController FPSInput;
void Start()
{
FPSInput = GetComponent<CharacterController>();
}
void OnTriggerEnter(Collider Col)
{
if (Col.gameObject.tag == "Ledge")
{
FPSInput.enabled = false;
inside = !inside;
}
}
void OnTriggerExit(Collider Col)
{
if (Col.gameObject.tag == "Ledge")
{
FPSInput.enabled = true;
inside = !inside;
}
}
void Update()
{
if (inside == true && Input.GetKey("Jump"))
{
chController.transform.position += Vector3.up / heightFactor;
}
}
its not a perfect script for what i want but its a start if i can just get it to work. I would much prefer to use the Invector Asset Package but I cant afford it so my only choice is to make the script from scratch or hopefully someone here can help me.
Your answer
![](https://koobas.hobune.stream/wayback/20220613044109im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Need Help with my climbing system 0 Answers
Unity system errors 0 Answers
Unity Package Manager Error 2018.4.21f1 0 Answers
ForcedScopedThreadAttach 0 Answers
Failed to Copy Assembly-CSharp.dll on Script-Compilation 0 Answers