I found some similar examples but wondered if anyone can provide some simple code for the following.
I want to use fixed camera pivots around my level.
This I can achieve several ways so no issue.
The problem is I want to be able to find the closest camerapivot to the player and position the camera there.
Sort of like a realtime resident evil type effect.
creating the pivots points is easy.
positioning the single camera accordingly is easy.
How do I mathematically calculate the nearest camerapivot.
I bet its really simple, but I cant figure it without a ton of math.
I want to use fixed camera pivots around my level.
This I can achieve several ways so no issue.
The problem is I want to be able to find the closest camerapivot to the player and position the camera there.
Sort of like a realtime resident evil type effect.
creating the pivots points is easy.
positioning the single camera accordingly is easy.
How do I mathematically calculate the nearest camerapivot.
I bet its really simple, but I cant figure it without a ton of math.