Is there a way to cast between the two vector3's?

Is there a way to cast between the two vector3’s? I am getting the translation of the transform of a prop and an entity but one is returning /verse.org/SpatialMath/vector3 and /UnrealEngine.com/Temporary/SpatialMath/vector3 is there a way to cast from one to another to have them interact? I am trying to subtract between the 2 to get the relative location of one to the other but it is causing errors.

You’re looking for these:

# Util function for converting a translation/position `vector3` from /UnrealEngine.com/Temporary/SpatialMath to a `vector3` from /Verse.org/SpatialMath.
FromVector3<public>(InVector3:(/UnrealEngine.com/Temporary/SpatialMath:)vector3)<reads>:(/Verse.org/SpatialMath:)vector3 = external {}

# Util function for converting a translation/position `vector3` from /Verse.org/SpatialMath to a `vector3` from /UnrealEngine.com/Temporary/SpatialMath.
FromVector3<public>(InVector3:(/Verse.org/SpatialMath:)vector3)<reads>:(/UnrealEngine.com/Temporary/SpatialMath:)vector3 = external {}

Search for them in the Verse API and you’ll find some other functions too.

You can qualify the namespace type like this:

(/UnrealEngine.com/Temporary/SpatialMath:)

(/Verse.org/SpatialMath:)
1 Like

Thank you, those were exactly what I was looking for.

1 Like