6 : Super(ObjectInitializer.SetDefaultSubobjectClass<UOptionalRepStaticMeshComponent>(TEXT(
"LeverSocket")))
8 PrimaryActorTick.bCanEverTick =
true;
11 static ConstructorHelpers::FObjectFinder<UStaticMesh> LeverSocketMeshFinder(
12 TEXT(
"StaticMesh'/PixoCore/Meshes/InteractableObjects/SM_Lever_Socket.SM_Lever_Socket'"));
13 UStaticMesh* LeverSocketMesh = LeverSocketMeshFinder.Object;
15 GetStaticMeshComponent()->SetStaticMesh(LeverSocketMesh);
17 static ConstructorHelpers::FObjectFinder<UStaticMesh> LeverMeshFinder(
18 TEXT(
"StaticMesh'/PixoCore/Meshes/InteractableObjects/SM_Lever_Top.SM_Lever_Top'"));
19 UStaticMesh* LeverMesh = LeverMeshFinder.Object;
21 Lever = CreateDefaultSubobject<UVRLeverComponent>(TEXT(
"Lever"));
22 Lever->SetStaticMesh(LeverMesh);
23 Lever->SetupAttachment(GetStaticMeshComponent());
25 Lever->LeverReturnTypeWhenReleased = EVRInteractibleLeverReturnType::LerpToMaxIfOverThreshold;
26 Lever->LeverRotationAxis = EVRInteractibleLeverAxis::Axis_Y;
27 Lever->LeverLimitPositive = 80.0f;
29 TextRenderComp = CreateDefaultSubobject<UTextRenderComponent>(
"TextRender");