I am trying to build some solar system rings around a star and thought to use the DrawCirlce() function. For the life of me I can’t get it to work. I put in all the correct params but the compiler keeps telling me that out of the 2 overloaded types it could not convert all the argument types… Any ideas why this failing… I am finding it very hard to find anyone with an example either online…
I have pasted the entire method below but really the line in question is: DrawCircle(GetWorld(), Base, RandomAngleX, RandomAngleY, RingColor, CurrentOrbitRingRadius, NumSides, true, Lifetime, DepthBias, LineThickness);
Would be grateful for any help, thank you UE community in advance…
void ASolarSystem::DrawSolarSystemRings()
{
//Get everything needed to create a DrawCircle
FVector const Base = GetActorLocation();
FVector MinRandomAngleX = FVector(0.0,0.0,0.0);
FVector MaxRandomAngleX = FVector(1.0,0.0,0.0);
FVector MinRandomAngleY = FVector(0.0,0.0,0.0);
FVector MaxRandomAngleY = FVector(0.0,1.0,0.0);
//Get random AngleX, AngleY using seed
FVector RandomAngleX = SolarSystemFunctionLib::GetRandomFVectorWithSeed(MinRandomAngleX, MaxRandomAngleX, GameInstance->ST_GetRandomStream());
FVector RandomAngleY = SolarSystemFunctionLib::GetRandomFVectorWithSeed(MinRandomAngleY, MaxRandomAngleY, GameInstance->ST_GetRandomStream());
FLinearColor const RingColor = FLinearColor::MakeFromHSV8(158, 67, 92);
int32 NumSides = 32;
uint8 DepthPriority = 0;
float LineThickness = 1.0f;
uint8 DepthBias = 0;
float Lifetime = -1.0f;
//Decide on how many celestial bodies will be around this planet
int32 RandomNumRingsWithSeed = SolarSystemFunctionLib::GetRandomIntWithSeed(MinOrbitRings, MaxOrbitRings, GameInstance->ST_GetRandomStream());
float PreviousRingRadius = StarSize + 1000.0f;
float CurrentOrbitRingRadius;
//Loop through each ring, create a random radius for each ring (previous ring + 1000 * random multiplier)
for (int32 i = 0; i < RandomNumRingsWithSeed; i++)
{
CurrentOrbitRingRadius = PreviousRingRadius + 1000.f * SolarSystemFunctionLib::GetRandomFloatWithSeed(1.2f,1.5f,
GameInstance->ST_GetRandomStream());
PreviousRingRadius = CurrentOrbitRingRadius;
DrawCircle(GetWorld(), Base, RandomAngleX, RandomAngleY, RingColor, CurrentOrbitRingRadius, NumSides, true, Lifetime, DepthBias, LineThickness);
}
}