Digging around in the Unreal API with the DUSK demo, I noticed that there is a UQuaternion object. Why do that instead of use the built in FQuat structure?
I believe that this was done so the data could be replicated. Remember NONE of the existing UE4 replication applies with Spatial, but that’s a good thing!
Thank you for exploring our integration and I hope you are having an enjoyable experience overall!
The UQuaternion is just a relic from our first iteration of the blueprint code generation implementation for the integration. There are currently several places in the Unreal integration where we code generate wrapper types to bridge between SpatialOS and the Unreal types(such as Quaternions, Maps and lists etc.). In some cases these bridge classes are necessary but sometimes they might just be a result of the implementation being in an early stage of development. We intend to revisit this as part of our backlog, however we will have to spend some more time planning to ensure that we get as “unreal native” as possible before I can provide you with more details on what it will look like and when it will be ready.
Rad. I think creating a UObject here is actually a major performance hog. Looking through this generated code, I see a lot of little places where there is an alloc or GC pressure being applied that simply doesn’t have to be.