Object Triggers
Object triggers enable you to trigger an event when a specific object (e.g. the player ship) either enters a trigger collider or gets within a specified distance of a transform. This can be useful for spawning enemies or creating a sequence of events that starts when the player reaches a certain point in the game world.
Creating An Object Trigger
To create a new object trigger, add the Object Trigger component to a transform. You can add a Trigger Collider to the transform if you want the event to be triggered when the trigger collider is entered (add a Rigidbody as well, to make sure that the trigger collision is detected).
Game Agent Triggers
To trigger an event when a vehicle that a specified Game Agent is in enters a trigger collider or gets within a specified distance of a transform, you can add a Game Agent Trigger to that transform and set the Game Agent.
By default, the Use Focused Game Agent is checked, so if you have a Game Agent Manager in the scene, it will automatically add the player as the trigger game agent, which means you don't have to set it yourself.
Last updated