3D side-scrolling camera?
by Michael Gentile · in Torque Game Engine · 08/24/2005 (8:06 am) · 6 replies
Sorry if I am posting in the wrong area, I hope it is the right one.
I am trying to create a game that is 3D, but has a side-scrolling camera, similar to what contra was on the ps2 (i believe it was ps2). There will be times in the game where I will switch to a behind the player 3rd person view, but for the majority of the game I need to create a side-scrolling 3rd person view. It would also be nice to be able to tweak the height of the camera to move up and down at specific scenes, to look at the character from directly on the side and then from a little further up on an angle. I am new to torque, still learning the ropes of the engine, and I haven't been able to find this information anywhere.
Any help would be very very appreciated. Thanks Everyone!
KingNothing6805
I am trying to create a game that is 3D, but has a side-scrolling camera, similar to what contra was on the ps2 (i believe it was ps2). There will be times in the game where I will switch to a behind the player 3rd person view, but for the majority of the game I need to create a side-scrolling 3rd person view. It would also be nice to be able to tweak the height of the camera to move up and down at specific scenes, to look at the character from directly on the side and then from a little further up on an angle. I am new to torque, still learning the ropes of the engine, and I haven't been able to find this information anywhere.
Any help would be very very appreciated. Thanks Everyone!
KingNothing6805
#2
Mike
08/24/2005 (1:05 pm)
Thomas, thanks a lot, I am looking at your advanced camera resource and trying to learn the code of it and will test out your method. Quick question though, in what file do I use the thirdPersonOffset(x,y,z) method? the camera.cs file? Thanks for all of your help.Mike
#3
08/25/2005 (12:21 am)
If you want, then yeah - the camera.cs you can add the AdvancedCamera datablock and use it from there.
#4
I hate to be a pain, but I have one more question. I got the side-scrolling 3D to work (Thanks, it looks awesome!), and right now I restricted the player's movement to left and right by disabling the mouselook and strafe, so that he can only move in a straight line back and forth. Is there any way to actually restrict player movement to a plane? I know you had mentioned this before. The way I did it was just for testing to see what the view would look like, and it is kind of the ghetto way of doing it, but I would like to implement a more concrete form of movement restriction. Any help is appreciated. Thanks,
Mike
09/01/2005 (6:41 am)
Thomas, I hate to be a pain, but I have one more question. I got the side-scrolling 3D to work (Thanks, it looks awesome!), and right now I restricted the player's movement to left and right by disabling the mouselook and strafe, so that he can only move in a straight line back and forth. Is there any way to actually restrict player movement to a plane? I know you had mentioned this before. The way I did it was just for testing to see what the view would look like, and it is kind of the ghetto way of doing it, but I would like to implement a more concrete form of movement restriction. Any help is appreciated. Thanks,
Mike
#5
09/01/2005 (12:56 pm)
In server script, you could check the player's position every tick, and adjust it if it wasn't on that plane already.
#6
You could even hack it into the player.cc code where it processes movement for the player, but I would recommend that its done in script if possible.
If I was to do this, I would not hack it into the code, but simply take the keymappings and manipulate those. Who knows if you at some point in time want to turn the player 30 degrees and let him wander in that direction for a while. Easy to do if you restricted the key inputs rather than the engine code.
Just a few ideas
I've played Viewtiful Joe on the Game Cube, and also got the idea myself to do this. So I've ran these camera ideas through my head a few times. As far as I can see, its a straight forward use of TGE/TSE. And actually a great indie game idea, as you restrict the amount of art needed but still have all the nifty 3d effects available.
Coding such a game in T2D would be trivial, but nothing beats the 3d effect
09/02/2005 (7:07 am)
Yup - e.g. say that he can only move where y=0 (as an example), thus resticting the movement to that plane.You could even hack it into the player.cc code where it processes movement for the player, but I would recommend that its done in script if possible.
If I was to do this, I would not hack it into the code, but simply take the keymappings and manipulate those. Who knows if you at some point in time want to turn the player 30 degrees and let him wander in that direction for a while. Easy to do if you restricted the key inputs rather than the engine code.
Just a few ideas
I've played Viewtiful Joe on the Game Cube, and also got the idea myself to do this. So I've ran these camera ideas through my head a few times. As far as I can see, its a straight forward use of TGE/TSE. And actually a great indie game idea, as you restrict the amount of art needed but still have all the nifty 3d effects available.
Coding such a game in T2D would be trivial, but nothing beats the 3d effect
Torque Owner Thomas \"Man of Ice\" Lund
Then restrict movement for the player to a plane - and then model your mission as one long stretch.
Later you can code/hack the camera code to detach the camera a bit from the player - give it a little "rubber band" kind of damping.
The code is fairly easy to follow, and I know several ppl have hacked their own camera modes based on the code.
Just a few ideas