1. Home
  2. Docs
  3. Ignis
  4. API-documentation
  5. FlammableObject

FlammableObject

Flammable object is a centerpiece of this system. It essentially works as an independent flammable object, able to catch flame. OAVA-Convert essentially just attaches this script to your object.

Public Functions

public void SetOnFireFromCenter()

Description: Sets the object on the fire from middle

Parameters: None

Returns: None

public void TryToSetOnFire(Vector3 fireOrigin, float ignitePower)

Description: Tries to set an object on fire. Object catches fire if Current Ignition progress > Object Ignition Time

Parameters: 

  • FireOrigin: From where are we trying to set the fire
  • IgnitePower: Current Ignition Progress += IgnitePower*Time.deltatime. Sets the multiplier of the ignition progress.

Returns: None

public void IncrementalExtinguish(Vector3 position, float startRadius, float radiusIncrement)

Description: Incrementally extinguishes the fire from position.

Parameters: 

  • Position: Position to extinguish
  • startRadius: How big is the extinguish area. Creates an increasing sphere, starting from this radius.
  • radiusIncrement: How much is the radius incremented each call if the new position is not extinguished. Simulates e.g. water flow on the ground.

Returns: None

Public void SaveOriginalMaterialShaderProperties()

Saves the state of the third-party shader in terms of the properties which Ignis animates. Properties to be saved need to be described in ShaderCompatibility ScriptableObject.

Public void ResetMaterialFromIgnis()

Description: Resets the properties which Ignis animates of all materials under the flammable object. Does not touch properties not animated/described in ShaderCompatibility ScriptableObject

Public void ResetObj()

Description: Resets flammable object properties to original. Does not reset the shader. Please use ResetMaterialFromIgnis() to reset the shader.

Gets

public Vector3 GetFireOrigin()

Gets the world position origin, where fire started at this moment (origin moves with object)

public float GetPutOutRadius()

Gets the current radius of the extinguishing effect.

Public Vector3 GetPutoutCenter()

Gets the center of the current extinguish effect in world coordinates.

public float GetCurrentIgnitionProgress()

Gets ignition progress (how long object has been tried to be ignited. Ignite multiplier multiplies the time) in seconds.

Public float GetObjectApproxSize()

Gets the approximated biggest size of the object by Ignis. This is usually the longest distance between corners of the object.

Leave a Reply

Your email address will not be published. Required fields are marked *