본문 바로가기
[ CODING STUDY ]/》언리얼엔진5 공부

언리얼엔진5 66장 [C++ 회전]

by MRG 2023. 6. 23.
728x90
반응형

▣ .h 헤더파일에서 FRotator 선언, 어느 방향으로 회전할지를 지정하기 위한 변수

 

▣ FRotator : F는 블루프린트를 의미, Rotator는 회전값

 

https://docs.unrealengine.com/4.26/en-US/API/Runtime/Core/Math/FRotator/

 

FRotator

Implements a container for rotation information. All rotation values are stored in degrees.

docs.unrealengine.com

 

 

▣  AddActorLocalRotation() : 로컬회전값을 기준으로 회전, 괄호 안에 회전할 FRotator값 * DeltaTime

 

https://docs.unrealengine.com/4.26/en-US/BlueprintAPI/Utilities/Transformation/AddActorLocalRotation/

 

AddActorLocalRotation

AddActorLocalRotation

docs.unrealengine.com

 

 

 

▣ 블루프린트로 생성 후 C++클래스에 PlayerRotation Z값을 수정 후 컴파일 저장

 

▣ 컴파일 후 실행 확인

728x90
반응형

댓글