How can i use 2 things that have to be so something happens?
public void OnTriggerEnter2D(Collider2D collisionObject)
{
Debug.Log("Trigger Hit");
if (collisionObject.gameObject.tag == "h" and Input.GetKey(KeyCode.W))
{
transform.Translate(Vector2.up * jumpspeed * Time.deltaTime);
}
}
![]()