관리 메뉴

기억을 위한 기록들

[UE4 - CPP] 속도 단위 변환 본문

UnrealEngine/UE4 - CPP

[UE4 - CPP] 속도 단위 변환

에드윈H 2021. 9. 11. 00:08
// cm/s
const float centimeterPerSecond = GetVelocity().Size(); // GetSpeed

// Km/h
const float KilometersPerHour = centimeterPerSecond * 0.036f;

// M/s
const float MeterPerSeconds = centimeterPerSecond * 0.0036f;

const float IwantSpeedKMh = 10.0f;
const float changeTouunit = IwantSpeedKMh / 0.036;  //1 Unreal Unit = 1cm