Results 1 to 8 of 8
  1. #1
    MSgt. Shooter Person
    Join Date
    May 2012
    Posts
    136

    Default 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
    MSgt. Shooter Person
    Join Date
    Nov 2011
    Location
    Hungary
    Posts
    119

    Default

    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.
    Last edited by Anteris; 06-26-2012 at 05:35 PM.

  3. #3
    MSgt. Shooter Person
    Join Date
    May 2012
    Posts
    136

    Default

    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
    MSgt. Shooter Person
    Join Date
    Nov 2011
    Location
    Hungary
    Posts
    119

    Default

    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
    MSgt. Shooter Person
    Join Date
    May 2012
    Posts
    136

    Default

    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
    MSgt. Shooter Person
    Join Date
    Nov 2011
    Location
    Hungary
    Posts
    119

    Default

    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".
    Last edited by Anteris; 06-26-2012 at 05:58 PM.

  7. #7
    MSgt. Shooter Person
    Join Date
    May 2012
    Posts
    136

    Default

    oh, i understand.
    thanks!

  8. #8
    MSgt. Shooter Person
    Join Date
    Nov 2011
    Location
    Hungary
    Posts
    119

    Default

    U're welcome. Hope you can make your camera now.


 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.