Script
Set animator param value
public class PlayerController : MonoBehaviour
{
private Rigidbody playerRb;
private Animator playerAnim;
void Update() {
if (Input.GetKeyDown(KeyCode.Space) && isOnGround) {
playerRb.AddForce(Vector3.up * jumpForce, ForceMode.Impulse);
isOnGround = false;
playerAnim.SetTrigger("Jump_trig");
}
}
}
Also: SetFloat
, SetBool
etc.