Announcement

Collapse
No announcement yet.

The most simple of camera

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    The most simple of camera

    Hello, been trying to create a simple camera for a few days. Quite new
    on this, it doesn't work. Here's my code:

    Game:
    Code:
    class AA_MyGame extends GameInfo;
    
    function PostBeginPlay()
    {
    	super.PostBeginPlay();
    }
    
    DefaultProperties
    {
    	PlayerControllerClass=class'UTGame.AA_PlayerController'
    }
    Controller:
    Code:
    class AA_PlayerController extends PlayerController;
    
    function PostBeginPlay()
    {
    	super.PostBeginPlay();
    }
    
    DefaultProperties
    {
    	CameraClass=class'UTGame.AA_Camera'
    }
    Camera:
    Code:
    class AA_Camera extends Camera;
    
    var vector vecLoc;
    var rotator rotRot;
    
    simulated event UpdateCamera(float DeltaTime)
    {
    	UpdateViewTarget(ViewTarget, DeltaTime);
    }
    function UpdateViewTarget(out TViewTarget OutVT, float DeltaTime)
    {
    			OutVT.POV.Location = vecLoc;
    			OutVT.POV.Rotation = rotRot;
    }
    DefaultProperties
    {
    	vecLoc=(x=300,y=200,z=600)
    	rotRot=(Pitch=0, Roll=0, yaw=50)
    }
    Now, what will pick up those 'OutVT.POV.Location' and 'rotation'?
    Thanks,,

    #2
    Found the problem.

    Comment

    Working...
    X