Kizspy | Question: 29
(Choose 1 answer)
What does this script do when a GameObject tagged "Player" enters a trigger collider?
using UnityEngine;
public class Animation Trigger: MonoBehaviour {
private Animator animator;
void OnTriggerEnter (Collider other) {
if (other.Compare Tag("Player")) {
animator.SetTrigger("OpenDoor");
A. Applies a dynamic force to the entering Player object
B. Triggers an animation state named "OpenDoor"
C. Records the spatial coordinates of the Player object
D. Deactivates the trigger collider upon Player entry