Announcement

Collapse
No announcement yet.

[Help] Custom Camera not working on iOS

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

    [Help] Custom Camera not working on iOS

    Hi guys, I have a problem with the custom camera, it works correctly on UDK PC, but when I try my level with Mobile Previewer is not working and the camera is set as the first person (FPS) in my pawn. Why? Help me pls.

    Code for PlayerController :

    Code:
    class PRG_PlayerController extends PlayerController;
    
    ...
    
    ...
    
    
    defaultproperties
    {
    	CameraClass=class'PRG_Camera'
    }
    Code for custom Camera :

    Code:
    class PRG_Camera extends Camera;
    
    var const archetype PRG_CameraProperties CameraProperties;
    
    function UpdateViewTarget(out TViewTarget OutVT, float DeltaTime)
    {
    	
    	if (PendingViewTarget.Target != None && OutVT == ViewTarget && BlendParams.bLockOutgoing)
    	{
    		return;
    	}
    
    	OutVT.POV.Location = OutVT.Target.Location + CameraProperties.CameraOffset;
    	OutVT.POV.Rotation = Rotator(OutVT.Target.Location - OutVT.POV.Location);
    }
    
    defaultproperties
    {
    	CameraProperties=PRG_CameraProperties'PRGGameContent.Archetypes.CameraProperties'
    }
    and Camera Properties :

    Code:
    class PRG_CameraProperties extends Object
    	HideCategories(Object);
    
    var(CameraProperties) const Vector CameraOffset;
    
    defaultproperties
    {
    }

    #2
    I removed the archetype (not knowing if the archetype are compatible with ios). So the new custom camera is :

    Code:
    class PRG_Camera extends Camera;
    
    var Vector CameraOffset;
    
    function PostBeginPlay()
    {
    	super.PostBeginPlay();
    	CameraOffset.X = -700;
    	CameraOffset.Z = 96;
    	CameraOffset.Y = 0;
    	ViewTarget.POV.FOV = default.DefaultFOV;
    }
    
    function UpdateViewTarget(out TViewTarget OutVT, float DeltaTime)
    {
    	ViewTarget.Target = PRG_PlayerController(PCOwner).Pawn;
    	
    	if (PendingViewTarget.Target != None && OutVT == ViewTarget && BlendParams.bLockOutgoing)
    	{
    		return;
    	}
    
    	
    	OutVT.POV.Location = OutVT.Target.Location + CameraOffset;
    	OutVT.POV.Rotation = Rotator(OutVT.Target.Location - OutVT.POV.Location);
    }
    
    defaultproperties
    {
    	DefaultFOV=90
    }*/
    but unfortunately it still does not work on MobilePreviewer, while working on PC Previewer! HELP

    Comment

    Working...
    X