Results 1 to 8 of 8

Thread: Isometric 3rd person camera?

  1. #1
    slader166
    Guest

    Isometric 3rd person camera?

    hey guys,
    i'm using the udk camera tech guide to make my camera,
    i love the isometric camera, and i love the controls from the 3rd person.

    so, why not combine them?

    now, MyPawn.uc is the only thing im editing (i think).

    i managed to get my desired height by changing the desiredZoffset to 10, but i cant figure out how to bring the camera backwards using the y axis,
    any ideas?

  2. #2
    Anteris
    Guest
    For an example:

    Code:
    simulated function bool CalcCamera( float fDeltaTime, out vector out_CamLoc, out rotator out_CamRot, out float out_FOV )
    {
    	out_CamLoc = Location; // = Pawn's location
    	out_CamLoc.Z += CameraDistance; // Z distance
    	out_CamLoc.X += CameraDistance * 0.45; // X distance & out_CamLoc.Y += your Y distance.
    
    	out_FOV = 60;
    
            out_CamRot.Pitch = -16384; / =90degree
            out_CamRot.Yaw = 0;
            out_CamRot.Roll = 0;
    
    
       return true;
    }
    This is my top-down camera.

    CameraDistance is a float variable to setup custom distances from my pawn.

  3. #3
    slader166
    Guest
    is there anything i need to add to my playercontroller, because im getting an error:
    \MyPawn.uc(6) : Error, Bad or missing expression after '+=': 'CameraDistance'

  4. #4
    Anteris
    Guest
    You need to declare CameraDistance in you pawn class and add a value in the default properties.

    Something like this:

    Code:
    var float CameraDistance;
    Code:
    DefaultProperties
    {
    CameraDistance = 1000.0; // for example.
    }

  5. #5
    slader166
    Guest
    am i adding this to the 3rd person code, or should it just look like this:

    class MyPawn extends UTPawn;

    var float CameraDistance;

    simulated function bool CalcCamera( float fDeltaTime, out vector out_CamLoc, out rotator out_CamRot, out float out_FOV )
    {
    out_CamLoc = Location; // = Pawn's location
    out_CamLoc.Z += CameraDistance; // Z distance
    out_CamLoc.X += CameraDistance * 0.45; // X distance & out_CamLoc.Y += your Y distance.

    out_FOV = 60;

    out_CamRot.Pitch = -16384; / =90degree
    out_CamRot.Yaw = 0;
    out_CamRot.Roll = 0;


    return true;
    }

    DefaultProperties
    {
    CameraDistance = 1000.0; // for example.
    }

  6. #6
    Anteris
    Guest
    This is just a simple example to how you can calculate your camera location, if u use the current code, you'll get a top-down camera. You'll have to calculate yourself your own values to get the right camera view you want.

    The variable names are clear, feel free to play with them.

    So the answer for your main question:

    Code:
    out_CamLoc.Y
    to get the Y coordinate of your camera (if u wanna make it backward use "-= postivievalue" or "+= negativevalue".

  7. #7
    slader166
    Guest
    oh, i understand.
    thanks!

  8. #8
    Anteris
    Guest
    U're welcome. Hope you can make your camera now.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •