Navigation
API > API/Runtime > API/Runtime/AIModule > API/Runtime/AIModule/AAIController
Description
Computes a launch velocity vector to toss a projectile and hit the given destination. Performance note: Potentially expensive. Nonzero CollisionRadius and bOnlyTraceUp=false are the more expensive options.
| Name | SuggestTossVelocity |
| Type | function |
| Header File | /Engine/Source/Runtime/AIModule/Classes/AIController.h |
| Include Path | #include "AIController.h" |
| Source | /Engine/Source/Runtime/AIModule/Private/AIController.cpp |
bool SuggestTossVelocity
(
FVector & OutTossVelocity,
FVector Start,
FVector End,
float TossSpeed,
bool bPreferHighArc,
float CollisionRadius,
bool bOnlyTraceUp
)
- true if a valid arc was computed, false if no valid solution could be found
Parameters
| Name | Remarks |
|---|---|
| OutTossVelocity | out param stuffed with the computed velocity to use |
| Start | desired start point of arc |
| End | desired end point of arc |
| TossSpeed | Initial speed of the theoretical projectile. Assumed to only change due to gravity for the entire lifetime of the projectile |
| CollisionSize | (optional) - is the size of bounding box of the tossed actor (defaults to (0,0,0) |
| bOnlyTraceUp | (optional) - when true collision checks verifying the arc will only be done along the upward portion of the arc |