Just asking for any advice on manually placed objects far from ellipsoid center.
I have a few demonstration pawns placed far from ellipsoid center to demonstrate that this product does indeed cover the entire earth. However, the camera view then has skewed rotations due to, well being far from ellipsoid center and “up” is not up there.
First I “fixed” this by calling a snap up to ellipsoid normal on possession and this worked for stationary things that are always oriented to the normal at that place on the globe. Like a tower or other structure.
Naively didn’t think of it until later. Adding an aircraft with a pre set roll or pitch this would re-orient the object to straight and level.
So would it be better to issue the snap up to ellipsoid normal at spawn time or will this also override the preset roll and pitch.
I’m going to try a few things, but if someone had an idea, it is greatly appreciated.
Minor success with doing the snap up to ellipsoid normal on spawn rather than on possession. Need an input file from a colleague to check for sure but it is hopeful.
Only issue now is that cameras on a springarm that do not inherit all of the parent’s rotational attributes are skewed. That one will be harder to manage. What I need is to to rotate the camera only to match “up” with the normal.
I recently did a dive into the spring arm component code while working on this issue:
Inside USpringArmComponent, the rotation is “lagged” by interpolating between the current rotation and a desired rotation, which is a member variable FRotator PreviousDesiredRot;
So to remedy the difference between the globe-relative rotation, and Unreal’s local rotations, you may have to use a similar approach in the forum post I linked. But instead of (or in addition to) caching the camera’s globe-relative position, you may have to cache the globe-relative rotation of the camera.
This is just a driveby suggestion though. Maybe you’ve already found a solution!