I’m slowly making my way through the code on this subject.
(This is a background task, luckily, given the dearth of publicly available information …)
Currently investigating: AGameplayAbilityTargetActor_ActorPlacement
There are a whole two (2) hits on this class name on Google!
One is the unreal docs, which just list the members (thanks! It’s not like I have the source right here! )
The other is the GameplayAbilityShooter subclassing it, which at least shows an actual use.
Maybe someone else will find this on Google when looking for it. Here’s hoping!
Anyway, the built-in asynchronous positioning features in the Gameplay Abilities System works as such:
You need to bind two input keys to “Confirm” and “Cancel” actions
Those should call YourPawn->AbilitySystemComponent->Target{Confirm,Cancel} which are pre-existing functions
Your GameplayAbility, in EventActivateAbility, needs to spawn a sub-task using WaitTargetData
This sub-task should be a GameplayAbilityTargetActor_ActorPlacement, configured with the appropriate size/assets
Note that this will use your player aim direction for placement, and the sphere (or capsule) of the size you configure, for placement. If you need fancier placement go/no-go, such as “needs flat ground” or “box collisions” or whatever, you’ll need to subclass this class, using C++.
Anyway, with this wired up, it works pretty well off the shelf. Just finding the right combination of pieces for this task was a PITA. Here’s the main part that might unlock the rest of the flow for someone else in a similar position: