Game Development Community

Paralax Scrolling (how?)

by Danny O Dwyer · in Torque X Platformer Kit · 10/04/2007 (5:44 am) · 2 replies

Hey all,

Just finished creating one of the backgrounds for my opening level, and i cant get the elements to paralax scroll. I applied the material to a scroller, and then assigned the parallax componant to it. MEssed around with the figures too, but no joy.

I must be missing something easy, but the super scant documentation was no help. Any1 have the simple answer?

Thanks in advance!
- Danny

About the author

Recent Threads


#1
10/05/2007 (5:36 pm)
You have to set the target of the parallax manager. If you check out the demo project you'll see this in BeginRun on in Game.cs:

// set the parallax manager's target object
T2DSceneCamera camera = TorqueObjectDatabase.Instance.FindObject<T2DSceneCamera>("Camera");
ParallaxManager.Instance.ParallaxTarget = camera;

In this case, "Camera" is the name of the camera in the scene file.
#2
11/05/2007 (12:32 pm)
Percect, have it working now.
must have overlooked that. not to play with variables!
thanks very much for the reply :)
-danny