Camera Mount Problem
by Johannes Pauw · in Torque Game Builder · 02/07/2006 (10:07 am) · 3 replies
To put it simply -- Camera mounting doesn't seem to be working for me. I'm creating a top-down spaceship game where I want the camera to track the player with a slight delay. The code I'm using is:
SceneWindow2D.mount($player, "0 0", 1, true);
It's in my createPlayer(); function, after the player has been totally defined and created. When I run Torque, the camera just sits there, even if the ship moves.
I really have no idea at all what's going wrong.
SceneWindow2D.mount($player, "0 0", 1, true);
It's in my createPlayer(); function, after the player has been totally defined and created. When I run Torque, the camera just sits there, even if the ship moves.
I really have no idea at all what's going wrong.
About the author
Torque Owner Adam Larson
$player = new t2dStaticSprite() { scenegraph = t2dScene; imageMap = ggLogoImageMap; linearVelocity = "10 0"; }; sceneWindow2D.mount($player, "0 0", 1, true);at the end of setupT2DScene in T2D/gameScripts/game.cs seems to work just fine. What version of T2D are you using? I tested this on Beta 1.
Could you post some more of your scripts and the console.log file. That would better help me track down the problem.