My Aritst made a wonderful model,
When Import it into the engine, it's not facing the right direction.
So in code...
//Create the static mheh
HoverCar = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("HoverCar"));
RootComponent = HoverCar;
//Attatch the mesh to our RootComponent
//Find the mesh that Chris made (Nice job Chris)
static ConstructorHelpers::FObjectFinder<UStaticMesh> HoverCarVisualAsset(TEXT("/Game/Models/HoverCar/Tank_Plate.Tank_Plate"));
//If the engine does find out static mesh called "Tank_Plate" in the directory..
//Set our UStaticMeshComponent called HoverCar to the object fount
HoverCar->SetRelativeLocation(FVector(0.0f, 0.0f, -40.0f));
//Fix the artist rotation - bug?
//FVector fixCarRot = FVector(0.0f, -90.0f, 0.0f);
//FQuat myQuat = FQuat(0.0f, 0.0f, 180.0f, 0.0f);
//FRotator myRot = FRotator(-90.0f, -90.0f, -90.0f);
This is in the Constuctor....I add the staticmesh.
This is the result...
So my camera is looking at Pawn in the right way.
THIS IS AN EASY Fix in Blue print, but no in c++.
I need to rotate my Static Mesh so it is facing the green direction.
My S.Mesh is the Root component btw.
Mar 28 '16 at 04:53 PM
in C++ Programming