Mounting background to camera
by Walter K · in Torque Game Builder · 11/25/2006 (11:11 am) · 3 replies
Working off the MiniPlatformerTutorial, I'm trying to have a background (t2dScroller) that stays fixed relative to the camera. I've tried two approaches: (1) setting the background's position to the camera's position in the onUpdateScene() function, and (2) mounting the background to the player object with the same settings as the camera.
The first approach causes some noticeable redraw problems if the player object moves too fast, and the background will lag behind the camera. The second approach draws perfectly, with the huge exception that the background flips along with the player object when setFlip is called.
Anyone have a different approach to the problem?
The first approach causes some noticeable redraw problems if the player object moves too fast, and the background will lag behind the camera. The second approach draws perfectly, with the huge exception that the background flips along with the player object when setFlip is called.
Anyone have a different approach to the problem?
Torque Owner Apurva Amin
hth