Navigation
API > API/Runtime > API/Runtime/AIModule > API/Runtime/AIModule/Perception > API/Runtime/AIModule/Perception/IAISightTargetInterface > API/Runtime/AIModule/Perception/IAISightTargetInterface/CanBeSeenFrom
References
| Module | AIModule |
| Header | /Engine/Source/Runtime/AIModule/Classes/Perception/AISightTargetInterface.h |
| Include | #include "Perception/AISightTargetInterface.h" |
virtual UAISense_Sight::EVisibilityResult CanBeSeenFrom
&40;
const FCanBeSeenFromContext & Context,
FVector & OutSeenLocation,
int32 & OutNumberOfLoSChecksPerformed,
int32 & OutNumberOfAsyncLosCheckRequested,
float & OutSightStrength,
int32 &42; UserData,
const FOnPendingVisibilityQueryProcessedDelegate &42; Delegate
&41;
Remarks
The method needs to check whether the implementer is visible from given observer's location. This version allows an asynchronous answer by returning Pending and using the provided Delegate when the information is computed Undefined to indicate that we need to try another CanBeSeenFrom implementation, Visible/NotVisible if visible/not visible from the observer's location, Pending if the check is not finished
Parameters
| Name | Description |
|---|---|
| Context | Struct containing all the information required to perform the query |
| OutSeenLocation | The first visible target location |
| OutNumberOfLoSChecksPerformed | The number of synchronous queries done. This is used to stop the perception tick sooner when too many LoS checks are done |
| OutNumberOfAsyncLosCheckRequested | The number of asynchronous queries done. This is used to stop the perception tick sooner when too many asynchronous LoS checks are done |
| OutSightStrength | The sight strength for how well the target is seen |
| UserData | If available, it is a data passed between visibility tests for the users to store whatever they want |
| Delegate | If available, the delegate to call later on, if the result needed asynchronous checks. Calling this delegate within the CanBeSeenFrom call will ensure |