Hi, I’m SpongeBob135, a complete Unity beginner, and I would like to know how you can make OnTriggerEnter2D register multiple times for the duration that something collides with the trigger. Right Now, it only registers once. Here is the code, if necessary:
public GameObject player;
public Rigidbody2D rb;
public ScoreManager sc;
public float jumpVelocity;
void OnTriggerEnter2D () {
player.GetComponent<Rigidbody2D>().AddForce(new Vector2(0, 1 * jumpVelocity));
sc.jumpup = true;
}
}