📚
Deadly Dungeons
  • Initial page
  • Traps
    • Introduction
    • Trap Triggers
    • Raycast Triggers
    • Disabling Traps with Triggers
    • Trap
    • Trap Mechanism
      • Animator
      • Launcher
      • Particle (Trap Mechanism)
      • Physics
    • Effect Handlers
      • Audio Handler
      • Particle (Effect Handler)
      • Ray Handler
      • Custom Effect Handler
    • Damage System
      • Damage Source
      • IDamageable
      • Damage Result
    • Damageable Example
    • Utility
      • AutoConnect Joint
      • Texture Mover
Powered by GitBook
On this page

Was this helpful?

  1. Traps

Raycast Triggers

PreviousTrap TriggersNextDisabling Traps with Triggers

Last updated 4 years ago

Was this helpful?

Use this trigger type for detector rays. Note that this is a trigger behavior only, for visualizing the laser beam you need a Ray Handler too.

  • Trap: the trap this detector ray controls.

  • Action: Activate, Deactivate or Toggle. (For Toggle you always need to specify a trap)

  • Cooldown: time (seconds) until the trigger can react to events again.

  • Max Distance: how far the ray (laser) should extend.

  • Layer Mask: use these to include or exclude objects from raycasting.

  • Tag Filter: the trigger reacts when the raycast hits a game object with these tags.

  • Events: you can set Unity Functions on specific events, for example, play audio, particle effect, or animation.