RTS Camera Problems
by Shawn Simas · in Torque Game Engine · 08/03/2004 (11:36 am) · 3 replies
Over the last couple days I've been trying to get an RTS camera to work, and I get close but nothing thats working.
I'm using Thomas Lund's Advanced Camera resource (www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5471
I've been switching in and out of using Cory's movemanager changes as well www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5474
Now, I've been trying to use a dummy object as the target for the Orbit camera.
(I've tried Player objects, and Camera objects)
The pitch, zoom, rotation works beautifully, its now the actual movement of the camera around the world that's giving me problems. If I use Cory's changes along with a Player() object it works great, except that a player doesn't really do what I need. It follows terrain and it flies off cliffs, doesn't stop too good, doesn't turn quickly, etc. So I figured a player wouldn't be what I needed, but if I use a camera things are all weird with Cory's changes. Without them forward/back/right/left work fine, but you can't rotate the camera because then up isn't up anymore, which is the other problem I've run in to.
I've tried using getTransform/setTransform on the dummy camera to try to rotate it along with the advanced camera but it hasn't been working at all.
If anyone out there could maybe point me in the right direction, or maybe you've done this yourself and can tell me what to do it would be greatly appreciated as I've been working on this nonstop for a few days now!
Thank you all,
Shawn.
I'm using Thomas Lund's Advanced Camera resource (www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5471
I've been switching in and out of using Cory's movemanager changes as well www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5474
Now, I've been trying to use a dummy object as the target for the Orbit camera.
(I've tried Player objects, and Camera objects)
The pitch, zoom, rotation works beautifully, its now the actual movement of the camera around the world that's giving me problems. If I use Cory's changes along with a Player() object it works great, except that a player doesn't really do what I need. It follows terrain and it flies off cliffs, doesn't stop too good, doesn't turn quickly, etc. So I figured a player wouldn't be what I needed, but if I use a camera things are all weird with Cory's changes. Without them forward/back/right/left work fine, but you can't rotate the camera because then up isn't up anymore, which is the other problem I've run in to.
I've tried using getTransform/setTransform on the dummy camera to try to rotate it along with the advanced camera but it hasn't been working at all.
If anyone out there could maybe point me in the right direction, or maybe you've done this yourself and can tell me what to do it would be greatly appreciated as I've been working on this nonstop for a few days now!
Thank you all,
Shawn.
#2
08/04/2004 (5:40 am)
Care to share with the class?
#3
The problem is it wouldn't work in multiplayer because it would be sending too many commandToServer's. I'm going to continue work on it then I'll share with the class :P
08/04/2004 (7:49 am)
It actually isn't good, it isn't the smoothest, its not terrible though.The problem is it wouldn't work in multiplayer because it would be sending too many commandToServer's. I'm going to continue work on it then I'll share with the class :P
Torque Owner Shawn Simas
Bigfoot Studios
*happiest man in the world*