I am trying to learn how to code in EU5, first ever game engine or API, and I made a pawn that is the default player and what I wanted to do is set my camera relative location scale with the size of the asset that I load. I believe my mistake is getting the radius of the sphere of the component. I don’t really understand how Transforms and getSphere works and I can tell that’s my issue. I tried to do it with this code.
v----------I tried many getTransform commands
FTransform Trans = CameraMesh->GetComponentTransform();
CameraMesh->UpdateBounds();
float Radius = CameraMesh->CalcBounds(Trans).SphereRadius;
//setup camera
Camera->FieldOfView = 120.f;
Camera->SetupAttachment(CameraMesh);
Camera->SetRelativeLocation(FVector(-100.f - Radius, 0.f,Radius + 50.f));
All my pawn does is move around and I haven added a mouse look around function but I am still learning.