Page 1 of 1

Over the shoulder View

Posted: Mon Sep 28, 2009 5:08 pm
by Unreal1ty
Hi,
i just started to work with Reality Factory for prototyping a game idea. I wanted to use a modified Third Person View in this game, which is also called Over the shoulder Camera (like the camera in Gears of War, Army of Two,...). So could you help me with this challenge? Maybe you could tell me what i have to do to modify the third person view.

Re: Over the shoulder View

Posted: Tue Sep 29, 2009 1:58 pm
by GMer
Well, in a modeling program of your choice make your player model. Then create a bone that goes out of the player's back and off to one side. Make another bone go straight up a bit, then one more aimed forwards (name this one a unique name you can remember, like "bone_camera". Compile the actor and bring it into reality factory (there are many tutorials that describe how to do this). There you attach a camera entity to your uniquely named bone (in this case, "bone" camera), and make sure that you enable the ability to use cameras (again there are tutorials that tell how to do this).
Welcome to the forum, and remember, the Manual is your friend :)

Re: Over the shoulder View

Posted: Tue Sep 29, 2009 3:14 pm
by Unreal1ty
Well, thank you for the quick reply. But i didn't expect an answer like this. So it is not possible in Reality Factory to define or modify the camera via coding or scripting? You mean i have to create a player model with a bone, which carries the camera through the maps? This is quite new and strange to me ^^

Re: Over the shoulder View

Posted: Tue Sep 29, 2009 5:27 pm
by Jay
Press F2 ingame and you will be in ThirdPersonView. Then in the install directory there is a file called 'camera.ini'. This is the place where you have to go to to modify the camera views, the important parts for you are under [General] and [ThirdPerson]. The manual is great source of information here. Also the file is well documented with comments (The lines with a semicolon at the beginning)

You can preset the view point in the PlayerSetup entity. LevelViewPoint must be 1 to set ThirdPerson. And while you're at it you can also set LockView to true so that it cannot be changed by the player. (Although i wouldn't do that in the beginning)

EDIT: If you want to heavily modify the cameras, you should indeed make a camera bone or use 'fixed' cameras that will be scripted to follow the player around... or a special camera pawn that follows the player and moves where it has to (The camera pawn would be easier than the fixed camera idea and maybe even better as you can directly 'fly around with it')

Re: Over the shoulder View

Posted: Tue Sep 29, 2009 6:36 pm
by Unreal1ty
I've already found the camera.ini, but i can' really modify the position of the camera. I just want to set the view of the third person a bit down to the floor and a bit to the right. Like someone's looking the player model over the shoulder.

Here is what i have in mind:
Image

So this is exactly the position i want to have in my game. Maybe it's possible to add some more definitions to the camera.ini like the camera position on the x and y axis. And before i start to read the manual: Is it possible to create an aim systen (camera zooms in by pressing the aiming button)? Kann man sich hier auch auf deutsch unterhalten? ^^

Re: Over the shoulder View

Posted: Wed Sep 30, 2009 1:41 am
by darksmaster923
I would prefer to script a pawn which is attached to the player from the position you specify, then attach the camera to it.
If you have experience with RF pawns, then try this

{
Spawn[ ()
{
SetNoCollision
LowLevel("setup");
} ]
setup[ ()
{
AttachCamera();
self.yaw_speed=10000;
self.pitch_speed=10000;
self.think="idle";
} ]
idle[ ()
{
PositionToPlayer(10,20,-20,true);
} ]
}

I don't actually have the help file or RF on this laptop right now, so it is extremely uncomplete, untested , and you can't even rotate the camera. Just positions to the player. It should work, but I haven't tried it yet. If you never used pawns before, then I suggest you start with one of the tutorials on this site

Re: Over the shoulder View

Posted: Wed Sep 30, 2009 1:29 pm
by Unreal1ty
Alright, thank you. I don't have any experience with RF pawns, but i am actually going through the tutorials. I'll try to script a pawn and keep you up to date.