Game Development Community

RTS type camera without the RTS pack

by Peter Vieira · in Torque Game Engine · 08/07/2007 (9:27 pm) · 3 replies

Is there a quick and easy way to script a camera to have static movement, that will target the player. Kind of like a RTS camera. I'm not worried about targeting the player just yet, that will come later. For right now,I'm more focused on loading my mission with a camera in the sky looking down at my character.

I've seen some talk about advanced cameras and such, but I don't want to recompile the torque engine. Is there anyway of scripting this?

#1
08/08/2007 (2:09 am)
Camera code is best handled in source. The current camera system in Torque doesn't expose a great deal of functionality through script, nor does it feature anything other than a simple 1st/3rd person camera system.

I recommend taking a look at the following resources:

  • Using a Separate Camera Object

  • Player Movement with a Separate Camera Object

  • [li]Controlling a Separate Camera
    #2
    08/14/2007 (8:15 am)
    Thanks, I figured out how to use a separate camera. Now, my next problem is getting my cursor to show. I've added Canvas.setCursor(DefaultCursor); in the server/scripts/game.cs ,startGame() function, but the cursor doesn't show up. Am I adding this script in the right place?? Or is there another way to add cursor to a fixed camera?
    #3
    08/14/2007 (8:42 am)
    I GOT IT!!. I should of have spent more time searching the forums before I posted.
    Here's what helped me.
    www.garagegames.com/mg/forums/result.thread.php?qt=21385

    I've added a noCursor = "0"; inside the PlayGui.cs