Hi guys i need some help.
I’m good at scripting trying to learn it.
So i’m making crouching script :
public bool Crouch;
public void Update()
{
if(Input.GetButtonDown("Crouch"))
{
//Only apply to collider(CharacterController)
transform.localScale -= new Vector3(0,0.5F,0);
Crouch = true;
}
else
{
//Get Back to same position?
Crouch = false;
}
}
Any clue how to make crouch only to the mesh not whole character, and how to get it back to same position.
Thank you