VerseIsland
Feed Learn Leaderboard Guides Explore Search Docs Verse Library
Sign in
Feed Learn Leaderboard Guides Explore Search Docs Verse Library
Fortnite › Verse Language · Up to Fortnite · Verse Language · 209 of 570 in Verse Language
Browse Fortnite

Verse API reference page for the SpatialMath module

Module import path: /UnrealEngine.com/Temporary/SpatialMath

  • UnrealEngine.com
  • Temporary
  • SpatialMath

Classes and Structs

Name Description
rotation
transform A combination of scale, rotation, and translation, applied in that order.
vector2 2-dimensional vector with float components.
vector2i 2-dimensional vector with int components.
vector3 3-dimensional vector with float components.

Functions

Name Description
MakeRotation Makes a rotation from Axis and AngleRadians using a left-handed sign convention (e.g. a positive rotation around +Z takes +X to +Y). If Axis.IsAlmostZero[], make the identity rotation.
MakeRotationFromYawPitchRollDegrees Makes a rotation by applying YawRightDegrees, PitchUpDegrees, and RollClockwiseDegrees, in that order: * first a yaw about the Z axis with a positive angle indicating a clockwise rotation when viewed from above, * then a pitch about the new Y axis with a positive angle indicating 'nose up', * followed by a roll about the new X axis axis with a positive angle indicating a clockwise rotation when viewed along +X. Note that these conventions differ from MakeRotation but match ApplyYaw, ApplyPitch, and ApplyRoll.
IdentityRotation Makes the identity rotation.
Distance Returns the 'distance' between Rotation1 and Rotation2. The result will be between: * 0.0, representing equivalent rotations and * 1.0 representing rotations which are 180 degrees apart (i.e., the shortest rotation between them is 180 degrees around some axis).
AngularDistance Returns the 'smallest angular distance' between Rotation1 and Rotation2 in radians.
MakeShortestRotationBetween Makes the smallest angular rotation from InitialRotation to FinalRotation such that: InitialRotation.RotateBy(MakeShortestRotationBetween(InitialRotation, FinalRotation)) = FinalRotation and MakeShortestRotationBetween(InitialRotation, FinalRotation)?.GetAngle() is as small as possible.
MakeShortestRotationBetween Makes the smallest angular rotation from InitialVector to FinalVector such that: InitialVector.RotateBy(MakeShortestRotationBetween(InitialVector, Vector)) = FinalVector and MakeShortestRotationBetween(InitialVector, FinalVector)?.GetAngle() is as small as possible.
MakeComponentWiseDeltaRotation Makes a new rotation from the component wise subtraction of the Euler angle components in RotationA by the Euler angle components in RotationB and ensures the returned value is normalized.
Slerp Used to perform spherical linear interpolation between From (when Parameter = 0.0) and To (when Parameter = 1.0). Expects that 0.0 <= Parameter <= 1.0.
ToString Makes a string representation of rotation in axis/degrees format with a left-handed sign convention. ToString(MakeRotation(vector3{X:=1.0, Y:=0.0, Z:=0.0}, PiFloat/2.0)) produces the string: "Axis: {x=1.000000,y=0.000000,z=0.000000} Angle: 90.000000".
DegreesToRadians Returns radians from Degrees.
RadiansToDegrees Returns degrees from Radians.
FromVector3 Util function for converting a translation/position vector3 from /UnrealEngine.com/Temporary/SpatialMath to a vector3 from /Verse.org/SpatialMath.
FromScalarVector3 Util function for converting a scalar vector3 from /UnrealEngine.com/Temporary/SpatialMath to a vector3 from /Verse.org/SpatialMath. Use this function when your vector indicates a magnitude on each axis but not a direction, such as when you convert a scale measurement rather than a translation or position.
FromRotation Util function for converting a rotation from /UnrealEngine.com/Temporary/SpatialMath to a rotation from /Verse.org/SpatialMath.
FromTransform Util function for converting a transform from /UnrealEngine.com/Temporary/SpatialMath to a transform from /Verse.org/SpatialMath.
FromVector3 Util function for converting a translation/position vector3 from /Verse.org/SpatialMath to a vector3 from /UnrealEngine.com/Temporary/SpatialMath.
FromScalarVector3 Util function for converting a scalar vector3 from /Verse.org/SpatialMath to a vector3 from /UnrealEngine.com/Temporary/SpatialMath. Use this function when your vector indicates a magnitude on each axis but not a direction, such as when you convert a scale measurement rather than a translation or position.
FromRotation Util function for converting a rotation from /Verse.org/SpatialMath to a rotation from /UnrealEngine.com/Temporary/SpatialMath.
FromTransform Util function for converting a transform from /Verse.org/SpatialMath to a transform from /UnrealEngine.com/Temporary/SpatialMath.
TransformVector Makes a vector3 by applying InTransform to InVector.
TransformVectorNoScale Makes a vector3 by applying InTransform to InVector without applying InTransform.Scale.
ReflectVector Makes a vector2 by inverting the SurfaceNormal component of Direction. Fails if not SurfaceNormal.MakeUnitVector[].
DotProduct Returns the dot product of V1 and V2.
Distance Returns the Euclidean distance between V1 and V2.
DistanceSquared Returns the squared Euclidean distance between V1 and V2.
Lerp Used to linearly interpolate/extrapolate between From (when Parameter = 0.0) and To (when Parameter = 1.0). Expects that all arguments are finite. Returns From*(1 - Parameter) + To*Parameter.
ToString Makes a string representation of V.
prefix'-' Makes a vector2 by inverting the signs of Operand.
operator'+' Makes a vector2 by component-wise addition of Left and Right.
operator'-' Makes a vector2 by component-wise subtraction of Right from Left.
operator'*' Makes a vector2 by component-wise multiplication of Left and Right.
operator'*' Makes a vector2 by multiplying the components of Right by Left.
operator'/' Makes a vector2 by dividing the components of Left by Right.
operator'/' Makes a vector2 by component-wise division of Left by Right.
ToVector2 Makes a vector2 by converting the components of V to floats.
IsAlmostEqual Succeeds when each component of V1 and V2 are within AbsoluteTolerance of each other.
DotProduct Returns the dot product of V1 and V2.
Equals Makes a vector2i that is component-wise equal to V1 and V2. Fails if any component of V1 does not equal the corresponding component of V2.
ToString Makes a string representation of V.
ToVector2i Makes a vector2i by component-wise truncation of V to intss.
prefix'-' Makes a vector2i by inverting the signs of Operand.
operator'+' Makes a vector2i by component-wise addition of Left and Right.
operator'-' Makes a vector2i by component-wise subtraction of Right from Left.
operator'*' Makes a vector2i by multiplying the components of Left by Right.
operator'*' Makes a vector2i by multiplying the components of Right by Left.
ReflectVector Makes a vector3 by inverting the SurfaceNormal component of Direction. Fails if not SurfaceNormal.MakeUnitVector[].
DotProduct Returns the dot product of V1 and V2.
CrossProduct Returns the cross product of V1 and V2.
Distance Returns the Euclidean distance between V1 and V2.
DistanceSquared Returns the squared Euclidean distance between V1 and V2.
DistanceXY Returns the 2-D Euclidean distance between V1 and V2 by ignoring the difference in Z.
DistanceSquaredXY Returns the squared 2-D Euclidean distance between V1 and V2 by ignoring their difference in Z.
ToString Makes a string representation of V.
Lerp Used to linearly interpolate/extrapolate between From (when Parameter = 0.0) and To (when Parameter = 1.0). Expects that all arguments are finite. Returns From*(1 - Parameter) + To*Parameter.
prefix'-' Makes a vector3 by inverting the signs of Operand.
operator'+' Makes a vector3 by component-wise addition of L and R.
operator'-' Makes a vector3 by component-wise subtraction of R from L.
operator'*' Makes a vector3 by component-wise multiplication of L and R.
operator'*' Makes a vector3 by multiplying the components of L by R.
operator'*' Makes a vector3 by multiplying the components of R by L.
operator'/' Makes a vector3 by dividing the components of L by R.
operator'/' Makes a vector3 by component-wise division of L by R.
IsAlmostEqual Succeeds when each component of V1 and V2 are within AbsoluteTolerance of each other.

Comments

    Sign in to vote, comment, or suggest an edit. Sign in
    📄
    Source
    Epic Games

    © Epic Games. Official Epic developer documentation, shown here as a reference with a link to the original. All rights remain with Epic Games. Terms ↗

    View original Sources & licensing
    Request removal
    Last updated Feb 10, 2026
    Keep exploring
    More in Verse Language · 209 of 570
    Prev
    sortby
    Next
    angulardistance
    Browse all files in this folder (A–Z)
    Next up
    • Module import path: /UnrealEngine.com/Temporary/SpatialMath
    • Module import path: /UnrealEngine.com/Temporary/SpatialMath
    • | [`rotation`
    • | [`transform`
    • | [`vector2`
    • | [`vector2i`
    Related topics
    • spatialmath Verse Language
    • spatialmath Verse Language
    • spatialmath Verse Language
    • vector2 Verse Language
    • vector2i Verse Language

    Related

    Open in graph →

    Related topics

    • spatialmath
    • spatialmath
    • spatialmath
    • vector2i
    • vector2
    VerseIsland · an archipelago of Verse & UEFN knowledge
    Learn Guides History About & Press Sources & Licensing Status

    Not affiliated with Epic Games. Fortnite, UEFN, Unreal Engine, and Verse are trademarks of Epic Games, Inc. Content is attributed to its source — see Sources & Licensing.