[언리얼] Location관련 함수들 정리

jh Seo·2025년 3월 31일

언리얼

목록 보기
17/18

개요

다양한 Get Location함수들을 정리해보려고한다.

GetComponentLocation()

FVector GetComponentLocation() const  

Return location of the component, in world space

컴퍼넌트의 location을 world 좌표계로 반환한다.

GetRelativeLocation()

FVector GetRelativeLocation() const  

Gets the literal value of RelativeLocation.
Note, this may be an absolute location if this is a root component (not attached to anything) or when IsUsingAbsoluteLocation returns true.

This exists so subclasses don't need to have direct access to the RelativeLocation property so it can be made private later.

relative location(로컬 좌표계)을 반환하지만 이 컴퍼넌트가 root이거나 IsUsingAbsoluteLocation가 true로 세팅 되어있다면 world 좌표계를 반환한다.

GetActorLocation()

FVector GetActorLocation() const  

Returns the location of the RootComponent of this Actor

액터의 월드 좌표계를 반환한다.

AddActorWorldOffset

actorworldoffset을 통한 액터 위치 변경도 있다.

	void AddActorWorldOffset  
(
    FVector DeltaLocation,  
    bool bSweep,  
    FHitResult& OutSweepHitResult,  
    ETeleportType Teleport  
)

Adds a delta to the location of this actor in world space.

월드 좌표계에서 액터를 매개변수로 들어온 델타값만큼 이동한다.

profile
코딩 창고!

0개의 댓글