Skip to main content

IRayBaseBehavior

Components to be used with ray behaviors must implement IRayBaseBehavior. It requires the component to have RayBehaviorData member with fields which are internally used by the framework. The fields are the same with ISimpleBaseBehavior, with the addition of:

  • MaxDistance - Maximum distance of ray hits to react to.
ISimpleBaseBehavior.cs
public interface IRayBaseBehavior
{
public RayBehaviorData BaseData { get; set; }
}

[Serializable]
public struct RayBehaviorData : IActivable
{
public byte Priority;
public float DirectionStrength;
public float SpeedStrength;

public float MaxDistance;

public bool Debug;
public Color Color;
public float DebugScale;

public bool IsActive { get; set; }
}