Hello Nicholas, thank you very much for your answer!
Sure, here is my test:
MyStaticMeshActor.h
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "Engine/StaticMeshActor.h"
#include "MyStaticMeshActor.generated.h"
/**
*
*/
UCLASS()
class GEOMETRYRUN_API AMyStaticMeshActor : public AStaticMeshActor
{
GENERATED_BODY()
public:
AMyStaticMeshActor();
protected:
virtual void BeginPlay() override;
};
MyStaticMeshActor.cpp
// Fill out your copyright notice in the Description page of Project Settings.
#include "MyStaticMeshActor.h"
#include "Runtime/Engine/Classes/Components/StaticMeshComponent.h"
#include "Runtime/CoreUObject/Public/UObject/ConstructorHelpers.h"
#include "Runtime/Engine/Classes/Kismet/KismetMathLibrary.h"
AMyStaticMeshActor::AMyStaticMeshActor() : AStaticMeshActor()
{
static ConstructorHelpers::FObjectFinder<UStaticMesh> Mesh(TEXT("StaticMesh'/Game/StarterContent/Shapes/Shape_Cone.Shape_Cone'"));
GetStaticMeshComponent()->SetStaticMesh(Mesh.Object);
SetMobility(EComponentMobility::Movable);
}
void AMyStaticMeshActor::BeginPlay()
{
Super::BeginPlay();
FRotator rotation = UKismetMathLibrary::MakeRotationFromAxes(-FVector::ForwardVector, -FVector::RightVector, -FVector::UpVector);
SetActorRotation(rotation);
}
I get the same result of my second screenshot, with these values as rotation:
{Pitch=0.000000000 Yaw=180.000000 Roll=0.000000000 }