I recall seeing a thread about this, but wasn't able to find it (and I apologize for using the wrong terminology). I am looking for a way to counter the effect of the 2D y-position of an object changing the further away it is from the camera. I drew up a simple diagram of where I'll be using this (this is an overhead view):
Note that this represents just one screen -- the full world will be longer, and the camera will move horizontally to follow the character. The idea is to have a simulated 2D world with 3D characters and 2D billboarded objects in the background. The visual y-offset with this setup causes the trees to float up off the ground the further away they are (which would be the desired behavior in a fully 3D world but not in a 2D world). A couple of ways I could counter this:
- Apply a formula to modify an object's y position based on it's distance (I'm not sure what formula to use)
- Use reproject2D3DWS to calculate the furthest two corners of a "ground polygon", and snap the background objects to it
Any thoughts on the best route to go?
Note that this represents just one screen -- the full world will be longer, and the camera will move horizontally to follow the character. The idea is to have a simulated 2D world with 3D characters and 2D billboarded objects in the background. The visual y-offset with this setup causes the trees to float up off the ground the further away they are (which would be the desired behavior in a fully 3D world but not in a 2D world). A couple of ways I could counter this:
- Apply a formula to modify an object's y position based on it's distance (I'm not sure what formula to use)
- Use reproject2D3DWS to calculate the furthest two corners of a "ground polygon", and snap the background objects to it
Any thoughts on the best route to go?