UKismetMathLibrary::SelectTransform
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintPure
Description
Returns A if bPickA is true, otherwise returns B. Picks between two full transforms (location, rotation, scale) in one Blueprint-friendly node.
Caveats & Gotchas
- • FTransform is internally stored as a quaternion; the selected value is returned via copy with no normalisation step, so denormalised rotation quaternions passed in will be returned unchanged.
- • No interpolation occurs — for smooth transitions between transforms use UKismetMathLibrary::TLerp (blend transforms) instead.
Signature
static UE_INL_API FTransform SelectTransform(const FTransform& A, const FTransform& B, bool bPickA) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| A | const FTransform& | Returned when bPickA is true. | — |
| B | const FTransform& | Returned when bPickA is false. | — |
| bPickA | bool | Selector: true returns A, false returns B. | — |
Return Type
FTransform Example
Pick spawn transform based on team C++
FTransform SpawnTM = UKismetMathLibrary::SelectTransform(TeamASpawn, TeamBSpawn, bIsTeamA);
World->SpawnActor<APlayerStart>(APlayerStart::StaticClass(), SpawnTM); See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?