UT2003 3rd person to 1st person camera

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

TheLedge_

New Member
Apr 27, 2004
4
0
0
3rd person to 1st person camera UT2003

Hi

Ive created a 3rd person camera system which acts like a fixed security camera
that aims to the player.

//================================================
// CustomController.
//================================================
class CustomController extends xPlayer;

//


event PlayerCalcView(out actor ViewActor, out vector CameraLocation,
out rotator CameraRotation )

{
local vector cameraOffset;
cameraOffset=vect(-200,0,75);
bBehindView=true;
ViewActor = ViewTarget;
CameraRotation=rotator( ViewActor.Location -CameraLocation);
}


The problem is that I also want to incorporate Matinee sequences.

So when a Matinee sequence is triggered, the camera is still in 3rd person and ends up aiming at the camera actor, and not doing what it would if in first person.

Im trying to write a playercontroller, so if a matinee sequence is triggered the camera would go to first person, and when the sequnce finishes triggers back to the 3rd person camera.

Would i need two player controllers one 1st person one 3rd person which are triggered by events?

my struggling script so far.


//================================================
// CustomController.
//================================================
class CustomController extends xPlayer;

event PlayerCalcView(out actor ViewActor, out vector CameraLocation,
out rotator CameraRotation )
{
Camerarotation=ActorRotation
CameraLocation=ActorLocation
}
//puts the camera in first person


{
local vector cameraOffset;
cameraOffset=vect(-200,0,75);
bBehindView=true;
ViewActor = ViewTarget;
CameraRotation=rotator( ViewActor.Location -CameraLocation);
}
//puts cam in 3rd person

anyhelp greatly appreciated
 

conscripted

New Member
Mar 1, 2004
113
0
0
australia
hages.net
I've been struggling with something similar. Needed to define and restrict the player view to the points I set. this is what Ive done so far

Code:
class TitrationController extends PlayerController; //yes thats chemistry if you r interested. virtual chem lab in UR2 runtime:D 

event PlayerCalcView(out actor ViewActor, out vector CameraLocation, out rotator CameraRotation )
{
    bBehindView=true;
    CameraLocation=Location;
    if (onstartLevel)
    {
        myVector = vect(20.0,0.0,20.0);
        onStartLevel = false;
    }

    CameraLocation.X+=myVector.X;    // [B]here[/B]
    CameraLocation.Z+=myVector.Z;    // [B]and here are the goods[/B]


}

event doGraphView()
{
    myVector.X+=60;
    myVector.Z+=100;
}

and theres some other things aswell but this gives you the main point. I believe the PlayerCalcView is updated every tick(), although Im not sure where this is handled, but its not important. It is done, and so I've used it. If you set up some variables that the PlayerCalcView uses to do its thing, then you can alter those variables, and PlayerCalcView will update properly.

so what you would need would be, make a function that is called when the matinee finished, which updates the PlayerCalcView.