- Edited
I am going crazy trying to understand how this works.
Static prerendered backgrounds are simple enough but I am absolutely lost at trying to get a 2D Camera to translate properly so that the 2D image aligns with the collision shapes in 3D.
I need some input on this problem.
Youtube any Final Fantasy 9 video, excluding the static backgrounds, when a tracking camera is used you can see that:
-the 2D background increments Y coordinates relative to the Z and Y of the character being tracked by the camera.
-the 2D background increments X coordinates relative to the tracked character's X position in 3D space.
If the 2D background's height is greater than the screen height, Y increments to a limit, which I assume would be designated with Godot's 2D Camera Limit parameters. Likewise with 3D x position and screen width.
BG Texture is drawn as a sprite and the camera sets it as its environment You need a 2D cam and a 3D cam Screen dimensions BG Texture size
I am getting really wierd coordinates when I unproject_position of the character that is being tracked, I am not sure why they aren't within the range of the screen dimensions, but they aren't, and one's negative
Not even sure why I use the unproject_position of the character other than developing some connection between 2D and 3D space
Maybe it is required to know this formula but i dont know why: distance_to_screen_edge_in_3d = tan(fov2/) * z
Anyway, I tried looking at a some stuff on GitHUB written for Ogre like the page below, but I couldn't really get anything from it other than generally recognizing some functions, but I just don't see how they would go together
**What I find really confusing is that in videos like FF9, the Camera is clearly in perspective mode because the character scales with space, but that the background stays aligned with the collision shapes from whatever angle the camera is tracking the character.