Game Development Community

Overhead Camera moves in the XY plane.

by Sailesh · in Torque 3D Professional · 08/11/2010 (3:46 am) · 4 replies

How to acheive this ?

I tried the example from RTS Prototype - but no luck.

Is there a way to achieve this by not using in the SpawnSphere part?

#1
08/11/2010 (5:39 am)
You can simply include the command to set the mode to overhead - the spawnsphere part is only to set it's position based on that.

You could just as easily set the camera's transform (I do this in my current project) and then set to overhead mode. You can also include an angle in the setTransform and then the overhead controls move on the XY plane while still keeping the angle.
#2
08/11/2010 (5:44 am)
Thanks for the help Bryan, I am new to T3D, can you kindly put some code as example?
#3
08/11/2010 (6:29 am)
Hey Sailesh, if you look up in the new T3D documentation. Read about the Camera Class.
You should see something like this
//lets make a new camera or use the one we already have depending on what we want to do.
%cam = new Camera();
//lets set its mode by just making the mode variable on the camera equal to the mode string "overhead".
%cam.mode = "overhead";
//Lets set the transform for the camera equal to some other objects transform in this case a spawnsphere.
%cam.setTransform() = %spawnsphere.getTransform();
Warning:: This was an educational example, I do not have your code in front of me so I cannot interperate it for your needs. I was just showing the steps you would need to take.
#4
08/11/2010 (7:58 am)
Great Jesse!
It works now Great!
Thank You!