API reference
API reference
Select your platform
No SDKs available
No versions available

AMRUtilityKitPositionGenerator Class

Extends AActor
Position generator that can be used to generate random positions on the surface in a specific room or any room.
It contains methods to generate random positions on the surface of a given spawn location, while ensuring that the generated positions are at least MinDistanceToEdge away from any edges, if it should run on start when MRUK initializes and follow the other settings specified in SpawnSettings.

Fields

RandomSpawnSettings : FMRUKRandomSpawnSettings
Settings that should be used when generating random positions.
Signature
FMRUKRandomSpawnSettings AMRUtilityKitPositionGenerator::RandomSpawnSettings
RunOnStart : bool
Whether GenerateRandomPositionsOnSurface() should be called automatically after the mixed reality utility kit has been initialized
Signature
bool AMRUtilityKitPositionGenerator::RunOnStart

Protected Member Functions

BeginPlay ()
Signature
virtual void AMRUtilityKitPositionGenerator::BeginPlay() override
Returns
void

Member Functions

GenerateRandomPositionsOnSurface ( OutTransforms )
Generates a set of random positions on the surface of a given spawn location, while ensuring that the generated positions are at least MinDistanceToEdge away from any edges and follow the other settings specified in SpawnSettings.
Signature
bool AMRUtilityKitPositionGenerator::GenerateRandomPositionsOnSurface(TArray< FTransform > &OutTransforms)
Parameters
OutTransforms: TArray< FTransform > &  An array of transforms representing the generated positions.
Returns
bool  A boolean value indicating whether valid positions were found. If no valid positions could be found, OutTransforms will be empty.
GenerateRandomPositionsOnSurfaceInRoom ( Room , OutTransforms )
Generates a set of random positions on the surface of a given spawn location, while ensuring that the generated positions are at least MinDistanceToEdge away from any edges and follow the other settings specified in SpawnSettings in the given room.
Signature
bool AMRUtilityKitPositionGenerator::GenerateRandomPositionsOnSurfaceInRoom(AMRUKRoom *Room, TArray< FTransform > &OutTransforms)
Parameters
Room: AMRUKRoom *  The room where the positions should be generated in.
OutTransforms: TArray< FTransform > &  An array of transforms representing the generated positions.
Returns
bool  A boolean value indicating whether valid positions were found. If no valid positions could be found, OutTransforms will be empty.

Static Member Functions

CanSpawnBox ( World , Box , SpawnPosition , SpawnRotation , QueryParams , CollisionChannel )
Signature
static bool AMRUtilityKitPositionGenerator::CanSpawnBox(const UWorld *World, const FBox &Box, const FVector &SpawnPosition, const FQuat &SpawnRotation, const FCollisionQueryParams &QueryParams, ECollisionChannel CollisionChannel)
Parameters
World: const UWorld *
Box: const FBox &
SpawnPosition: const FVector &
SpawnRotation: const FQuat &
QueryParams: const FCollisionQueryParams &
CollisionChannel: ECollisionChannel
Returns
bool