I’m trying to fly from my starting location to another location. When I move to the new location the pawn starts to fly up (z-axis). If I fly back to the original location, it stays put when it arrives.
I’ve tested Fly to Location LLH/ECEF versions as well as the MoveTo version. In all cases my class (derived from GlobeAwareDefaultPawn):
arrives at the second destination
it appears the GlobeAnchor location is properly updated
the OnFlightComplete event fires
my pawn immediately flies up (perpendicular) to the new location.
If I get the actor velocity (when the OnFlightComplete fires) it returns x=0.000 y=0.000 z=1000000.000.
So far I am unable to figure out where this velocity is coming from. Has anyone else encountered this? Any ideas how to troubleshoot? I’ve turned off physics, collision, and anything else I can think of. I’ve tried to zero out any velocities, inputs, but it still flies off the planet at the second location.
It seems the z velocity after flying/moving is being set to the value the Movement Component has set in its “Max Speed” field.
The issue only seems to happen when the second location is a large distance away from the original origin. I’m not certain of the threshold distance but I would estimate something larger than 1500km or so.
Are you using Unreal Engine 5.1? If so, you will have to disable “Enable World Bounds Checks” in the project settings, otherwise the game will try to pull you back into a limited “bounds” if you fly too far away.