Has anyone been able to get the new Guard Spawner SpawnAt() function (introduced in the 39.0 update) to work yet?
When I try to use it, I get the error:
This function parameter expects a value of type tuple(vector3,?Rotation:?rotation = …), but this argument is an incompatible value of type tuple(vector3,?rotation)
This function parameter expects a value of type tuple(vector3,?Rotation:?rotation = …), but this argument is an incompatible value of type tuple(vector3,?Rotation:?rotation).
Here you go, this should result in 0 errors just make sure to have the Unreal Engine spatial math module at the top of your verse file, I changed it so It uses the FromVector3 and FromRotation so they convert to the required type.
That seemed to have worked thanks! Although I will say this has to be the least optionable parameter I have ever seen to the point it seems like a bug.
But it is optional? You can remove the Rotation part and code will compile just fine and it will instead use the rotation of the creature spawner device.
The main problem was that you were using the outdated unreal engine spatial math (transform/vector3/rotation) module instead of the new LUF Verse Spatial Math Module
So when I use the /Verse.org/SpatialMath it requires the rotation parameter. But when I just use the /UnrealEnging.com/Temporary/SpatialMath it does not require the rotation parameter. Which is odd because the function is defined as using the verse spatial math.
Nope that is not true, Rotation is optional, YOU CAN NOT use /UnrealEnging.com/Temporary/SpatialMath as the SpawnAt parameter.
It strictly requires a vector3 from the /Verse.org/SpatialMath module.
Epic has kindly provided the FromVector3 utility function inside the /UnrealEnging.com/Temporary/SpatialMath module that when run
Converts /UnrealEnging.com/Temporary/SpatialMathVector3 to /Verse.org/SpatialMathVector3
/Verse.org/SpatialMathVector3 to /UnrealEnging.com/Temporary/SpatialMathVector3
Essentially FromVector3 converts the value to the other module