improving my isometric view
by Roger D Vargas · in Torque 3D Beginner · 04/14/2014 (8:03 am) · 7 replies
Following the directions in my previous post www.garagegames.com/community/forums/viewthread/135596 I managed to implement an isometric camera. But now it is locked to the character, and I would like to move freely scrolling view up/down/left/right when mouse cursor reaches screen edges, and rotate it around a point with keys. I was looking for some sort of empty node I can use to anchor the camera to it, but didnt found it, can somebody give me an idea about how to implement this? Also, the recommended projection for this view is orthographic, how can I switch camera to ortho mode?
About the author
Game developer and writer
#2
04/14/2014 (1:33 pm)
The RTS tutorial uses a free look system and Im trying to achieve something more like old isometric games. A good example in Torque3D is Age of Decadence.
#3
04/15/2014 (1:17 pm)
Then set your camera angle and remove the mouse axis bindings. Actually, the RTS tut toggles back and forth from "free look" to fixed by disabling/enabling the mouse cursor - when the cursor is enabled the mouse doesn't move the camera.
#4
1- I think I can attach the camera to a spawn sphere, so it can be moved/rotated independently of character
2- For that Im going to need some mouse move callback that probably goes inside PlayGui.cs, which will send a command to server that will do the actual camera movement. Still have no idea about how to check if cursor reached screen edges, guess there will be somewhere a function to get the cursor position
3- For rotation, I still have no idea about how to link it to a keystroke, maybe using default.bind.cs. Also, havent search if there is some rotate function for spawn spheres
04/16/2014 (6:23 am)
Ok, this is what I got so far:1- I think I can attach the camera to a spawn sphere, so it can be moved/rotated independently of character
2- For that Im going to need some mouse move callback that probably goes inside PlayGui.cs, which will send a command to server that will do the actual camera movement. Still have no idea about how to check if cursor reached screen edges, guess there will be somewhere a function to get the cursor position
3- For rotation, I still have no idea about how to link it to a keystroke, maybe using default.bind.cs. Also, havent search if there is some rotate function for spawn spheres
#5
I'm thinking there is a way to use one of the standard camera modes to make it follow the player without rotating but I'm not sure of the right combination of settings. The camera has a lot of features but it's not exactly intuitive to use....
04/16/2014 (6:49 am)
Cursor screen edge can be accomplished using GuiMouseEvent controls.I'm thinking there is a way to use one of the standard camera modes to make it follow the player without rotating but I'm not sure of the right combination of settings. The camera has a lot of features but it's not exactly intuitive to use....
#6
04/16/2014 (7:53 am)
Ah, I dont need to follow the player (like Diablo games), but the opposite (think of Fallout or Baldur's Gate), I want to let the camera scroll away from it over the map. I will look at GuiMouseEvent controls.
#7
I believe the code was in gameCore.cs under the death section
%this.setMode(%obj,"Observer"); This would unhook the cam from the player but still allow the player to move and run out of the camera view
04/21/2014 (4:12 pm)
I may be incorrect but I know when i was working with a top down experiement the camera unhooked on player death and it didn't follow the player anymoreI believe the code was in gameCore.cs under the death section
%this.setMode(%obj,"Observer"); This would unhook the cam from the player but still allow the player to move and run out of the camera view
Torque Owner Richard Ranft
Roostertail Games