本文整理汇总了C++中AActor::AddActorWorldRotation方法的典型用法代码示例。如果您正苦于以下问题:C++ AActor::AddActorWorldRotation方法的具体用法?C++ AActor::AddActorWorldRotation怎么用?C++ AActor::AddActorWorldRotation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AActor
的用法示例。
在下文中一共展示了AActor::AddActorWorldRotation方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SpawnWall
void ADokController::SpawnWall(EWallType Wall, int32 i, int32 j)
{
FActorSpawnParameters spawnParams;
spawnParams.Owner = this;
spawnParams.Instigator = Instigator;
AActor* SpawnedWall = nullptr;
switch (Wall)
{
case Up:
SpawnedWall = GetWorld()->SpawnActor<AActor>(Tile_Wall, FVector((j * 100 - 50) * TileScaling, (i * 100) * TileScaling, 50 * TileScaling), FRotator(90, 0, 0), spawnParams);
SpawnedWall->AddActorWorldRotation(FRotator(0, 0, 90));
break;
case Left:
SpawnedWall = GetWorld()->SpawnActor<AActor>(Tile_Wall, FVector((j * 100) * TileScaling, (i * 100 - 50) * TileScaling, 50 * TileScaling), FRotator(90, 90, 0), spawnParams);
SpawnedWall->AddActorWorldRotation(FRotator(90, 0, 0));
break;
case Right:
SpawnedWall = GetWorld()->SpawnActor<AActor>(Tile_Wall, FVector((j * 100) * TileScaling, (i * 100 + 50) * TileScaling, 50 * TileScaling), FRotator(90, 90, 0), spawnParams);
SpawnedWall->AddActorWorldRotation(FRotator(90, 0, 0));
break;
case Down:
SpawnedWall = GetWorld()->SpawnActor<AActor>(Tile_Wall, FVector((j * 100 + 50) * TileScaling,( i * 100) * TileScaling, 50 * TileScaling), FRotator(90, 0, 0), spawnParams);
SpawnedWall->AddActorWorldRotation(FRotator(0, 0, 90));
break;
}
SpawnedWall->SetActorScale3D(FVector(SpawnedWall->GetActorScale3D().X * TileScaling, SpawnedWall->GetActorScale3D().Y * TileScaling, SpawnedWall->GetActorScale3D().Z * TileScaling));
}