1. Home
  2. Docs
  3. Magio
  4. Tutorials
  5. Ignite effects by raycasting or by overlap sphere

Ignite effects by raycasting or by overlap sphere

Example 1: You want to start the plantify effect when the player does nature magic or attacks with a grass blade.

Example 2: You want to ignite objects in the range of your grenade.

Example 3: You want the effect to start where your bullet hits.

Steps:

  1. Create Empty GameObject
  2. Add Component->Sphere Ignite
    1. You can also Add Component->Raycast Ignite for bullets etc.
  3. Choose wanted affected class (In this tutorial “Flame” is chosen to light up the object)
  1. Test it out by moving the sphere gizmo close to the object you have converted.

Tips:

  • You can also make this as a prefab which you instantiate in case of explosion/magic/etc.
  • You can control the cast by disabling “Repeating raycast” and calling SphereIgniteCast() or CastRayCastIgnite()
Was this article helpful to you? Yes No

Leave a Reply

Your email address will not be published.