Top down camera, how to in T3D?
by Kenneth Bowen · in Torque 3D Professional · 06/02/2009 (9:24 pm) · 8 replies
Hi guys and gals,
I am new to the torque engine and to this community so stop me if I am approaching things in the wrong way :).
Objective: Make a locked, top down camera, similar to Warcraft 3 or other RTS games.
Steps taken: I was looking at the Advanced Camera system that Cory Osborn wrote many years ago. It seems that there a top down camera there and I though "perfect, should be easy".
After trying to implement this or find another way, I found multiple build errors and my skill in T3D/programming isn't there yet to really make my own camera.
How can I implement a top down camera using T3D? I don't mind to hack it together, but some insight to how I can get my hands/mind around a camera would be very helpful.
I am new to the torque engine and to this community so stop me if I am approaching things in the wrong way :).
Objective: Make a locked, top down camera, similar to Warcraft 3 or other RTS games.
Steps taken: I was looking at the Advanced Camera system that Cory Osborn wrote many years ago. It seems that there a top down camera there and I though "perfect, should be easy".
After trying to implement this or find another way, I found multiple build errors and my skill in T3D/programming isn't there yet to really make my own camera.
How can I implement a top down camera using T3D? I don't mind to hack it together, but some insight to how I can get my hands/mind around a camera would be very helpful.
#2
Advanced Camera
Dont know how compatible with T3D it is, though.
06/03/2009 (7:42 am)
I dont know about the Cory Osborn resource, I think this one is most used:Advanced Camera
Dont know how compatible with T3D it is, though.
#3
06/03/2009 (7:45 am)
The Advanced Camera is integrated in T3D, isn't it.
#4
06/03/2009 (1:41 pm)
The camera code has been updated for Torque 3D, but AFAIK it is not the Advanced Camera code since it is not network-friendly.
#5
Novack, You're right, Cory did something else involved with it, but the Lund code is what I was talking about. I was battling that for a good long while.
06/04/2009 (5:23 pm)
Hey Oswaldo, that resource looks very good, I am going to try playing with that tonight.Novack, You're right, Cory did something else involved with it, but the Lund code is what I was talking about. I was battling that for a good long while.
#6
I'm trying to do the same thing myself. I've integrated the Advanced Camera resource into Torque 3D, so I guess there is both (the latest Torque 3D camera.h) and (the port of the advancedCamera.h), to work with.
Basically like you said, I would be very happy if I could just get a clone of Warcraft 3's camera (or Savage 2's commander) for Torque 3D. Though I guess I'm willing to settle for something simpler like just using-or-copying the camera.h Free Look (setFlyMode) to work with keyboard controls for a top-down view...
Would love to hear some details if you figure either of these out :-)
06/06/2009 (8:46 pm)
@Kenneth:I'm trying to do the same thing myself. I've integrated the Advanced Camera resource into Torque 3D, so I guess there is both (the latest Torque 3D camera.h) and (the port of the advancedCamera.h), to work with.
Basically like you said, I would be very happy if I could just get a clone of Warcraft 3's camera (or Savage 2's commander) for Torque 3D. Though I guess I'm willing to settle for something simpler like just using-or-copying the camera.h Free Look (setFlyMode) to work with keyboard controls for a top-down view...
Would love to hear some details if you figure either of these out :-)
#7
arrow keys: move up down left right
ins/del: slant/orbit camera angle left/right, but then snap-back to original angle
mouse scroll wheel or page-up/page-down: zoom in/out
Although I personally would much prefer it to be default mapped with WASD instead of arrow keys, and QE instead of ins/del.
And most of the time I think you would just zoom out all the way and use WASD. The QE (or ins/del) and zoom-in I think is just for showing off the graphics stuff.
So, an alternative 3D RTS control/camera scheme... Would instead use QE to actually rotate the camera angle (rather than just snap-back to original angle). This is done in (Savage 2) and (Bungie's Myth: TFL). This is what I'm actually hoping to implement.
Specifically, I'm talking about QE to rotate/orbit around the camera look-at target position (on the terrain?), which is different than having it actually turn left/right.
06/06/2009 (9:14 pm)
I guess the controls for the Warcraft 3 camera actually are...arrow keys: move up down left right
ins/del: slant/orbit camera angle left/right, but then snap-back to original angle
mouse scroll wheel or page-up/page-down: zoom in/out
Although I personally would much prefer it to be default mapped with WASD instead of arrow keys, and QE instead of ins/del.
And most of the time I think you would just zoom out all the way and use WASD. The QE (or ins/del) and zoom-in I think is just for showing off the graphics stuff.
So, an alternative 3D RTS control/camera scheme... Would instead use QE to actually rotate the camera angle (rather than just snap-back to original angle). This is done in (Savage 2) and (Bungie's Myth: TFL). This is what I'm actually hoping to implement.
Specifically, I'm talking about QE to rotate/orbit around the camera look-at target position (on the terrain?), which is different than having it actually turn left/right.
#8
Has a tutorial for making a hack and slash and RTS camera. You'll have to figure out the control object yourself. Most pertains to the Observer camera and not the player. I haven't figured out yet how to control the player. Probably simple, but I haven't had the time yet.
10/21/2009 (10:35 am)
Update to this: Check out scripting in the Docs that ship with T3D for Version 1.0+ Has a tutorial for making a hack and slash and RTS camera. You'll have to figure out the control object yourself. Most pertains to the Observer camera and not the player. I haven't figured out yet how to control the player. Probably simple, but I haven't had the time yet.
Torque Owner Oswaldo Grassiotto
Longshot Studios
If you are willing to do some porting or just want a reference this resource might help you, not sure but I think it was meant for TGE.