MinDistanceToEdge away from any edges, if it should run on start when MRUK initializes and follow the other settings specified in SpawnSettings.
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 |
BeginPlay
()
|
Signature
virtual void AMRUtilityKitPositionGenerator::BeginPlay() override Returns void |
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 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.
|
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: ECollisionChannelReturns bool |