Class LargeWorlds
The engine utility for large worlds support. Contains constants and tools for using 64-bit precision coordinates in various game systems (eg. scene rendering).
Inheritance
Namespace: FlaxEngine
Assembly: FlaxEngine.CSharp.dll
Syntax
[Unmanaged]
public static class LargeWorlds : Object
Fields
ChunkSize
Defines the size of a single chunk. Large world (64-bit) gets divided into smaller chunks so all the math operations (32-bit) can be performed relative to the chunk origin without precision loss.
Declaration
[Unmanaged]
public const float ChunkSize = 8192F
Field Value
System.Single
|
Properties
Enable
Enables large worlds usage in the engine. If true, scene rendering and other systems will use origin shifting to achieve higher precision in large worlds.
Declaration
[Unmanaged]
public static bool Enable { get; set; }
Property Value
System.Boolean
|
Methods
UpdateOrigin(ref Vector3, Vector3)
Updates the large world origin to match the input position. The origin is snapped to the best matching chunk location.
Declaration
[Unmanaged]
public static void UpdateOrigin(ref Vector3 origin, Vector3 position)
Parameters
Vector3
origin
The current origin of the large world. Gets updated with the input position. |
Vector3
position
The current input position (eg. render view location or auto listener position). |
Remarks
Used only if LargeWorlds.Enabled is true.