Name | Default Response | Use |
---|---|---|
LightSource | Overlap | Object type for light source colliders. |
IlluminationZone | Overlap | Object type for light source illumination zone collider. |
Name | Collision | Object Type | Description |
---|---|---|---|
LightSource | Query Only | LightSource | LightSource object that ignores all object types. This is an environmental query only. |
IlluminationZone | Query Only | IlluminationZone | IlluminationZone object that ignores all object types. This is an environmental query only. |
Function Name | Parameters | Return | Privacy | Description |
---|---|---|---|---|
ProbeNearbyLightSources | LightSourceDetectorRadius (Float) , LightSourceObjectType (EObjectTypeQuery Enum Array) |
TotalIlluminanceValue (Float) |
public | This will probe all non-global light sources within a given radius and return TotalIlluminanceValue which is the accumulated illuminance of all probed light sources. First, it performs a multi-sphere trace around the owner. The trace radius is defined by LightSourceDetectorRadius and it is traced against object types in the array LightSourceObjectType . For this, it will trace against only IlluminationZone objects to get all nearby light sources. |
Function Name | Parameters | Return | Privacy | Description |
---|---|---|---|---|
CalculateIlluminanceValue | LightSourceActor (Actor) |
IlluminanceValue (Float) |
private | This will get the illuminance value of the given LightSourceActor . First, it will check if the owner is within the LightSourceActor illumination zone. Then, it will check if there is no obstruction between the owner and LightSourceActor . If both of these checks pass, it will calculate and return the illuminance value (IlluminanceValue ) of LightSourceActor . If one or both of these tests fail, it will return IlluminanceValue as 0. |
Function Name | Parameters | Return | Privacy | Description |
---|---|---|---|---|
CheckIfTargetIsIlluminated | LightSourceActor (Actor) , LineTraceObjectType (EObjectTypeQuery Enum Array) |
bIsIlluminated (Boolean) , DistanceFromLightSource (Float) |
private | Checks if there is no obstruction between the LightSourceActor and the owner by performing a line trace. LineTraceObjectType determines the object types to trace against. For this implementation, this is set to LightSource only. This function returns bIsIlluminated as true if there are no obstructions. The function also returns the distance between the LightSourceActor and the owner (DistanceFromLightSource ). |
Function Name | Parameters | Return | Privacy | Description |
---|---|---|---|---|
CalculateIlluminanceValue | LightSourceActor (Actor) , Distance (Float) |
IlluminanceValue (Float) |
private | Calculates the illuminance value on the owner. This is calculated by dividing the Intensity of LightSourceActor by the Distance squared. I found this formula from: All About Light Intensity |
Function Name | Parameters | Return |
---|---|---|
CheckIfActorIsInIlluminatedArea | IlluminatedActor (Actor) |
bIsInIlluminatedArea (Boolean) |