I purchased a Geodesic Sphere generator plugin from the marketplace and have spent a few days transferring it to c++ for better performance since Its math heavy and may potentially be used frequently in my project.
The problem I’m having is when generating the initial data, the vectors need to be rotated but I’m getting incorrect results compared to the original Marketplace Asset. I tried moving the RotateVector part to Blueprints because this is where the inconsistency starts. Rotating the vectors returns the expected result in my Blueprint but when assigning these values to variables declared in the header and attempting to access them in c++ results in random numbers being assigned to any axis with a value of 0. See the pictures below to see exactly what I mean.
I declare and set the variables to zero here in the header
This is the blueprint function that rotates the vectors and sets the variables, the values in the red box are what they should be, these are the same values the original Marketplace Asset shows
This is where I attempt to access the Vectors but you can see the values are not what they were when set in the blueprint. The commented lines are the c++ version of this but it also returns the same values as the function above. Also note that this happens directly after the values are set in the function above. There is no other usage of these variables other than these 3 lines and the blueprint above.
I’m not sure if this is just an engine bug or if I’m potentially doing something wrong but any help would be appreciated!