Parallax math

Fafnir312Fafnir312 Member Posts: 161
edited November -1 in Working with GS (Mac)
Math is not my strong-suit... in fact I'd say it's my kryptonite.

I need help figuring out what math it will take to perform the parallax mapping I want. I'm creating a platformer with the player and platforms/ground on scrolling layers. I have an image of mountains (1024x256 increased in scene to 1680x700) on a non-scrolling layer. The scene is 10,000x1,440

My thought is to move the mountains slowly according to how far across the scene the player has traveled both in X and Y. The mountains should move completely from left side to right and from bottom to top depending on where the player is in the scene. But I've no idea how to go about this. Does anyone have ideas on how to do this or has anyone done this? Maybe this isn't the best way to go about it.
Sign In or Register to comment.