UDN
Search public documentation:

ChangingUnits
日本語訳
中国翻译
한국어

Interested in the Unreal Engine?
Visit the Unreal Technology site.

Looking for jobs and company info?
Check out the Epic games site.

Questions about support via UDN?
Contact the UDN Staff

UE3 Home > UnrealScript > Changing Unreal Units

Changing Unreal Units


Overview


Many of the constants in the Unreal Engine have been tweaked to achieve good results for the current scale. As a result, deviating from this scale by a factor of 2 should be fairly straightforward, but deviating by a factor of 10 might have some subtle and hard to track down side effects. In general, Epic does not recommend changing the Unreal Unit scale by more than a factor of 2.

Current Game Scales


In all of the Unreal Tournament games, 1 Unreal Unit is equal to 2 cm.

In Gears of War approximately 2 Unreal Units equal 1 inch, because the characters are 156 units tall and a floor of a building is 256 units tall. This was decided on for grid purposes and so our cover height worked out well.

Most licensees use a scale of 1 Unreal Unit to 1 cm.

Changes


Importing

UE3 treats one Max Unit as one Unreal Unit, regardless of what length the units were originally set to in Max.

Gameplay

Some of the properties that will need to be changed for gameplay reside in your Scout.uc subclass and your Pawn.uc subclass. Your defaultgame.ini file is where you can set the appropriate gravity for your scale. Your defaultengine.ini file is where you'll specify what scout subclass to use for your game.

You'll need to change a bunch of defaultproperties in scripted and defined properties in C++, such as MaxStepHeight, MaxJumpHeight, MaxOutOfWaterStepHeight, CrouchHeight, CrouchRadius, GroundSpeed, AirSpeed, JumpZ, DefaultGravityZ, GroundSpeed, etc.

Pathing

For pathing, in Scout you have PathSize, TestJumpZ and more.

Networking

The networking code quantizes positions down to integer Unreal units to save bandwidth. The quantization will need to be adjusted appropriately for a new scale.

Audio

The audio distance factor in UnAudio.h will need to be changed:

In ALAudioDevice.h (line 16):

// 2 UU == 1"
// <=> 1 UU == 0.0127 m
#define AUDIO_DISTANCE_FACTOR ( 0.0127f )