UEFN has two spatial math modules:
/UnrealEngine.com/Temporary/SpatialMath(fields X, Y, Z) will be deprecated in UEFN 45.00./Verse.org/SpatialMath(fields Forward, Left, Up) replaces it.
If your project's Verse code has any of the following, migrate it to /Verse.org/SpatialMath:
A
using { /UnrealEngine.com/Temporary/SpatialMath }lineA parent import such as
using { /UnrealEngine.com/Temporary }, with names qualified through it, such asSpatialMath.vector3A reference to the old module by its path, such as
(/UnrealEngine.com/Temporary/SpatialMath:)vector3
If you are setting up a completely new project, use /Verse.org/SpatialMath for 3D math and /UnrealEngine.com/Temporary/UI for 2D vectors that the UI API requires. You can skip the rest of this guide.
This guide explains the changes between modules, how to move a project over, how to handle files that mix both modules, and what happens to saved player data.
Migration Timeline
As of UEFN v44.00 (December 5, 2026): You can start migrating, one file at a time. Epic functions that take the old types also accept the new types, and old code runs without warnings. Keep the old type on persisted
vector3fields.As of UEFN v45.00 (March 4, 2027): Old code still compiles and runs, but every use of the old module produces a warning that names its replacement. You can now retype persisted
vector3fields, and saved values migrate when they load.
You can migrate your Verse files any time. Persisted vector3 fields must wait until 45.00.
SpatialMath Module Comparison
The following table shows how the two modules differ in field names, handedness, and how rotations combine.
/UnrealEngine.com/Temporary/SpatialMath | /Verse.org/SpatialMath | |
Import |
|
|
|
|
|
Coordinate system |
|
|
Same point in both |
|
|
|
|
|
|
|
|
Rotate a vector |
|
|
Compose rotations |
|
|
Apply a transform |
|
|
|
|
|
Persistable |
|
|
The only sign change is the Left axis. The old Y axis pointed right, the new Left axis points left, so Left = -Y. This applies to positions, directions, and offsets. A scale or any other magnitude has no direction and must not be negated.
using { /Verse.org/SpatialMath }
# Old: vector3{X := 100.0, Y := 50.0, Z := 0.0}, 50 cm to the right.
Position := vector3{Forward := 100.0, Left := -50.0, Up := 0.0}
# A scale is not a direction. No sign change.
Scale := vector3{Forward := 2.0, Left := 2.0, Up := 2.0}Migration Steps
To migrate your project, follow this process:
Migrate the Verse files that use the old module. To find them, search your project for
SpatialMathand check which module each match refers to. See Migrate Files.If your project has persistable data with
vector3fields, keep the old type for now. See Migrate Persisted Data.After the last file is migrated, remove every remaining conversion call and old import.
Migrate Files
You can migrate your project one file at a time, starting with any file.
To migrate a file, follow these steps:
Replace the import. Change
using { /UnrealEngine.com/Temporary/SpatialMath }tousing { /Verse.org/SpatialMath }. If the file usesvector2orvector2i, addusing { /UnrealEngine.com/Temporary/UI }. See Migrate 2D Vector Types.Fix struct literals and field access.
XbecomesForward,ZbecomesUp,YbecomesLeftwith the sign flipped for positions, directions, and offsets. Leave the sign alone for scales.
Note: If the file has @editablevector3fields, changing to the new type resets the values you set in the editor. Write down the current values first and set them again afterward.Replace functions that changed name or shape using the Function Replacements table.
Operators,Distance,DotProduct,Lerp,Length,MakeUnitVector,IsAlmostEqual,IsAlmostZero,IsFiniteandReflectVectorkeep their names.
Where the new module has no function of the same name, the right column shows the expression to use instead.
Note: If you replaced rotation functions, test the rotation order in game. Both modules compose rotations in the same order, but mistakes are common when you write these expressions by hand.Calls into Epic APIs such as
Character.TeleportTo[Position, Rotation]compile unchanged oncePositionandRotationare the new types, because 44.00 added overloads on the new types. A few functions changed shape. The Epic API Overloads table lists each one, with the new function to call.Build Verse. Every remaining error is one call site that mixes an old and a new value. Fix each one in one of these ways:
Convert the value at that point. See Convert Values Between Old and New Types.
If the file must keep both modules, qualify the type. See Qualify Types When Both Modules Are in Scope.
Function Replacements
The functions in /Verse.org/SpatialMath have been available for years. The table maps each old function to the one that does the same job, which may not behave identically in every case.
Old | New | Note |
|
| Left = -Y for positions |
|
| Ignores Up |
|
| |
|
| The new CrossProduct is right-handed. CrossProductLeftHanded reproduces the old result |
|
| Sign convention is mirrored: a positive angle around Up now turns Forward toward Left |
|
| Yaw right, pitch up and roll clockwise seen from behind keep their meaning |
|
| |
|
| |
|
| A is applied first, then B |
|
| |
|
| |
|
| Mirror the sign |
|
| Local rotation goes first |
|
| |
|
| |
|
| Index with (0), (1), (2) instead of [0], [1], [2] |
|
| The vector3 overload keeps its name |
|
| No direct equivalent |
|
| Same behaviour |
|
| Right is the negated Left axis |
|
| |
|
|
Epic API Overloads
The following table lists the Epic API overloads added in 44.00 that accept the new types. The old overloads keep working. Where a function changed shape, the new version uses a transform instead of a separate position and rotation.
Old-typed function | New-typed function (44.00) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Before
using { /UnrealEngine.com/Temporary/SpatialMath }
Character.TeleportTo[vector3{X := 0.0, Y := 500.0, Z := 100.0}, MakeRotationFromYawPitchRollDegrees(90.0, 0.0, 0.0)]
# After
using { /Verse.org/SpatialMath }
Character.TeleportTo[vector3{Forward := 0.0, Left := -500.0, Up := 100.0}, MakeRotationFromYawPitchRollDegrees(90.0, 0.0, 0.0)]Convert Values Between Old and New Types
While a project is half migrated, one file may hand an old value to a function that now wants the new type, or the other way around. The compiler reports it as a parameter type mismatch, for example "This function parameter expects a value of type (/UnrealEngine.com/Temporary/SpatialMath:)transform, but this argument is an incompatible value of type (/Verse.org/SpatialMath:)transform." Convert at that boundary with the functions in the old module. Each exists in both directions and picks the direction from its argument type.
Function | Use for | Left axis |
| Positions, directions, offsets | Negated |
| Scales and other magnitudes | Kept |
| Rotations | Handedness converted |
| Transforms. Translation as a position, Scale as a magnitude | As above |
using { /UnrealEngine.com/Temporary }
using { /Verse.org/SpatialMath }
# OldDevice.GetPosition() still returns an old vector3.
NewPosition:vector3 = Temporary.SpatialMath.FromVector3(OldDevice.GetPosition())The conversion functions live in the old module, so from 45.00 they warn like everything else there. Treat them as scaffolding that disappears when the last file is migrated.
A file that writes the name of an old type, such as the type of a value a function returns, must either import the old module or qualify the type.
Qualify Types When Both Modules Are in Scope
Both modules define vector3, rotation and transform. A file that imports both cannot use those names bare: "Identifier vector3 could be one of many types: UnrealEngine.com.Temporary.SpatialMath.vector3 or Verse.org.SpatialMath.vector3". The cleanest fix is to import only one module per file and convert at the boundary. When a file needs both, pick one of these spellings.
Fully qualify every use. Verbose, but unambiguous.
using { /UnrealEngine.com/Temporary/SpatialMath }
using { /Verse.org/SpatialMath }
my_class := class:
OldPosition:(/UnrealEngine.com/Temporary/SpatialMath:)vector3 = (/UnrealEngine.com/Temporary/SpatialMath:)vector3{}
NewPosition:(/Verse.org/SpatialMath:)vector3 = (/Verse.org/SpatialMath:)vector3{}Import the parent of one module and spell that module with a prefix. The bare names then resolve to the other module.
using { /UnrealEngine.com/Temporary/SpatialMath }
using { /Verse.org }
my_class := class:
OldPosition:vector3 = vector3{}
NewPosition:SpatialMath.vector3 = SpatialMath.vector3{} # /Verse.org/SpatialMathusing { /UnrealEngine.com/Temporary }
using { /Verse.org/SpatialMath }
my_class := class:
OldPosition:SpatialMath.vector3 = SpatialMath.vector3{} # /UnrealEngine.com/Temporary/SpatialMath
NewPosition:vector3 = vector3{}Functions follow the same rule. With both modules imported, Distance(A, B) on two new vectors resolves on its own because only one overload fits, but a bare vector3{} literal does not, so qualify the literal. Importing /UnrealEngine.com and writing Temporary.SpatialMath.vector3 also works.
A second kind of ambiguity appeared in 44.00. /UnrealEngine.com/Temporary/UI and /UnrealEngine.com/Temporary/SpatialMath both provide the vector2 functions and operators (Distance, DotProduct, +, * and so on). A file that imports both and calls one of them unqualified on vector2 values gets an ambiguous call error. The type itself is not ambiguous, because the old module's vector2 is an alias of the UI one. Fix: Remove the old SpatialMath import from that file, or qualify the call as (/UnrealEngine.com/Temporary/UI:)Distance(A, B).
Migrate 2D Vector Types
The 2D types have no spatial meaning and no counterpart in
/Verse.org/SpatialMath, so in 44.00 they moved to/UnrealEngine.com/Temporary/UItogether with their functions and operators./UnrealEngine.com/Temporary/SpatialMathkeepsvector2andvector2ias aliases of the UI types. They are the same type, so no conversion is needed, and multiple aliases resolve to the aliased type even when all aliases are in scope. @editable values are untouched and persisted data loads as before.To migrate, replace the import with
using { /UnrealEngine.com/Temporary/UI }. Nothing else changes.From 45.00 the aliases and the old module's vector2 functions warn with "Use /UnrealEngine.com/Temporary/UI instead."
Use 2D vectors only for UI-related code. In every other case, use 3D vectors.
Migrate Persisted Data
Persistable classes and structs are checked against the published version of the island on every Launch Session, Push Changes, and publish. A published field cannot change type. This section covers what that means for the old types in 44.00.
Which Persisted Types Need Migration
vector2andvector2ifields: These need no changes. The old names are aliases of the UI types, so the check sees the same type.rotationandtransformare not persistable in either module, so there's nothing to migrate.Old
vector3fields in 44.00: The type cannot change. Retyping to the newvector3fails with "V3645: The type of this definition (vector3) is not compatible with the type of the published definition (vector3)". Keep the old type until 45.00.
If You Don't Want to Migrate Yet
Keeping an old vector3 field in a persistable class is fine. It loads and saves as before. Retyping these fields becomes possible in 45.00.