Skip to content

Instantly share code, notes, and snippets.

@BobGneu
Created November 10, 2014 04:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BobGneu/b58e0d88b482e6f2eefc to your computer and use it in GitHub Desktop.
Save BobGneu/b58e0d88b482e6f2eefc to your computer and use it in GitHub Desktop.
APlanet *AExodusGameMode::CreatePlanet()
{
FVector Location = FVector::ZeroVector;
APlanet *planet;
planet = GetWorld()->SpawnActor<APlanet>(Location, FRotator::ZeroRotator);
check(planet != NULL);
planet->SetRotationRate(FMath::SRand() * 2 * PlanetRotationRate - PlanetRotationRate);
planet->EnsureViscinityIsClear(WorldBounds);
return planet;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment