Setting values for PaperFlipbookComponent in C++

// Fill out your copyright notice in the Description page of Project Settings.


#include "Red.h"
#include "PaperCharacter.h"
#include "PaperFlipbookComponent.h"
#include "PaperFlipbook.h"

ARed::ARed()
{
	
	PrimaryActorTick.bCanEverTick = true;

	PaperFlipbookComponent = GetSprite();
	UPaperFlipbook* myFlipbook = LoadObject<UPaperFlipbook>(nullptr, TEXT("/Script/Paper2D.PaperFlipbook'/Game/PaperAssets/Characters/Red/FB_Idle_D.FB_Idle_D'"));
	PaperFlipbookComponent->SetFlipbook(myFlipbook);
	
	PaperFlipbookComponent->SetWorldRotation(FRotator(0.f, 90.f, 0.f));
}

void ARed::BeginPlay()
{
	Super::BeginPlay();
}

As expected, it is not applied. The compilation itself passes normally. I thought that there might be some other problem with the C++ compilation not being reflected, so I tried adding a function to change the rotation, but the rotation did not change.

This may be a different problem from the first question, but the code is very simple so I don’t know what to try… As I understand it, this code just does the initial setup.


No change even with SetRelativeRotation

SetRelativeRotation
1 Like