Members - Reputation: 144
Posted 23 August 2012 - 11:10 AM
I am trying to implement the parallax scrolling in my XNA 3d game. However all information that I have found is always refered to 2d games. I have just implemented an octree in my game, so I have to add the differents "layers" of the parallax in the octree and then the problem start. I see multiple alternatives for implementing the parallax.
The first alternative is moving in the Octree the "layer" with the speed assigned to it as the player moves. The problem with this is that I have to update most of the Octree every time the player moves.
The second alternative is not modifing the Octree. Instead, I would modify the BoundingFrustum of the camera to adapt it to each layer. The problem is that I don't know if I can modify the BoundingFrustum and if I can modify it, I have to find the correct position of the layer rendering (it isn't the original position of the layer).
Is there a simpler alternative that I have just outlined? Or at least faster?
Thanks in advance.
PD: Sorry for my english level.
Members - Reputation: 396
Posted 24 August 2012 - 07:10 AM