Hard core maths content. Instead of assuming that the path is a great circle and working out the distance, the video sets up a formula for integrating the length of an arbitrary path. Then it uses the Euler-Lagrange equation to obtain a differential equation for the shortest path. The resulting nightmare integral needs a clever substitution. Eventually it all simplifies and the path lies in a plane through the center of the sphere.
When UDK first came out the main player object was a "Pawn" that you could customize, but I was unhappy with that, I wanted to write the whole thing and understand it.
I still brag about my PlayerEntities Camera Rotation function, so cool, in game camera third person rotation is tricky business, you need to calc the camera objects position in an imaginary sphere around the player model, which basically means your formula has to be able to take any full sphere (not just 360 arc) and determine any point along it for a certain angle then convert that to game-world-xyz coordinates based on the models position and pan values along all 3 axis.
It's actually rather simple, ONCE YOU LEARN IT. still cool.
puremadness 1 points 6 months ago
this is my favorite kind of math
When UDK first came out the main player object was a "Pawn" that you could customize, but I was unhappy with that, I wanted to write the whole thing and understand it.
I still brag about my PlayerEntities Camera Rotation function, so cool, in game camera third person rotation is tricky business, you need to calc the camera objects position in an imaginary sphere around the player model, which basically means your formula has to be able to take any full sphere (not just 360 arc) and determine any point along it for a certain angle then convert that to game-world-xyz coordinates based on the models position and pan values along all 3 axis.
It's actually rather simple, ONCE YOU LEARN IT. still cool.