Results 1 to 5 of 5
  1. #1
    MSgt. Shooter Person
    Join Date
    Jan 2012
    Posts
    31

    Default Problems with Matinee Camera Animations

    Hi everyone!

    I am trying to make a very simple test camera animation through Matinee. I created the DirectorGroup, and the CameraGroup properly following UDN video tutorials but when I touch the volume that should trigger the animation nothing happens...

    I have tried to find the solution and I think that there has to be a problem with my PlayerCamera class... None of my classes inherit from any UTClass.

    Could that be a problem? How could I make my camera leave the control to Matinee?

    Here I post my PlayerCamera code in case you can find any problem... Thank you very much in advance!

    Code:
    class GPPlayerCamera extends CoverCamera;
    
    // Reference to the camera properties
    var GPCameraProperties CameraProperties;
    var GPTPCameraProperties TPCameraProperties;
    var GPShoulderCameraProperties SHCameraProperties; 
    
    // Required for smooth camera movement
    var Vector CurrentCamLocation;
    var Vector DestinationCamLocation;
    var Rotator CurrentCamOrientation;
    var Rotator DestinationCamOrientation;
    
    /**
     * Query ViewTarget and outputs Point Of View.
     *
     * @param		OutVT			ViewTarget to use.
     * @param		DeltaTime		Delta Time since last camera update (in seconds).
     */
    function UpdateViewTarget(out TViewTarget OutVT, float DeltaTime)
    {
    	local GPPlayerPawn GPPlayerPawn;
    	local Pawn Pawn;
    	local Vector V, HitLocation, HitNormal;
    	local vector CamStart;
    	local float DesiredCameraZOffset;
    
    	
    	if (CameraProperties == None)
    	{
    		Super.UpdateViewTarget(OutVT, DeltaTime);
    	}
    
    	// Don't update outgoing viewtarget during an interpolation 
    	if (PendingViewTarget.Target != None && OutVT == ViewTarget && BlendParams.bLockOutgoing)
    	{
    		return;
    	}
    
    	Pawn = Pawn(OutVT.Target);
    	GPPlayerPawn = GPPlayerPawn(Pawn);
    	if (Pawn != None)
    	{
    		CamStart = Pawn.Location;
    		DesiredCameraZOffset = 1.2 * Pawn.GetCollisionHeight() + Pawn.Mesh.Translation.Z;
    		CamStart.Z += DesiredCameraZOffset;
    
    		if (GPPlayerPawn.IsAiming)
    		{
    			CameraProperties = SHCameraProperties;
    		}
    		else
    		{
    			CameraProperties = TPCameraProperties;
    		}
    
    		// If the camera properties have a valid pawn socket name, then start the camera location from there
    		if (Pawn.Mesh != None && Pawn.Mesh.GetSocketByName(CameraProperties.PawnSocketName) != None)
    		{
    			Pawn.Mesh.GetSocketWorldLocationAndRotation(CameraProperties.PawnSocketName, DestinationCamLocation, DestinationCamOrientation);
    		}
    		// Otherwise grab it from the target eye view point
    		else
    		{
    			OutVT.Target.GetActorEyesViewPoint(DestinationCamLocation, DestinationCamOrientation);
    		}
    
    		// If the camera properties forces the camera to always use the target rotation, then extract it now
    		if (CameraProperties.UseTargetRotation)
    		{
    			OutVT.Target.GetActorEyesViewPoint(V, DestinationCamOrientation);
    		}
    
    		// Add the camera offset
    		DestinationCamOrientation += CameraProperties.CameraRotationOffset;
    		// Calculate the potential camera location
    		DestinationCamLocation += (CameraProperties.CameraOffset >> DestinationCamOrientation);		
    
    		// Smooth location transition
    		if (DestinationCamLocation != CurrentCamLocation)
    		{
    			CurrentCamLocation = VInterpTo(CurrentCamLocation,DestinationCamLocation,DeltaTime,10);
    		}
    
    		// Smooth rotation transition
    		if (DestinationCamOrientation != CurrentCamOrientation)
    		{
    			CurrentCamOrientation = RInterpTo(CurrentCamOrientation,DestinationCamOrientation,DeltaTime,10);
    		}
    
    		OutVT.POV.Location = CurrentCamLocation;
    		OutVT.POV.Rotation = CurrentCamOrientation;
    
    		if (Trace(HitLocation, HitNormal, OutVT.POV.Location, CamStart, false, vect(12,12,12)) != None)
    		{
    			OutVT.POV.Location = HitLocation;
    		}
    	}
    }
    
    defaultproperties
    {
    	SHCameraProperties=GPShoulderCameraProperties'GP_Archetypes.Camera.GPShoulderCameraProperties'
    	TPCameraProperties=GPTPCameraProperties'GP_Archetypes.Camera.GPTPCameraProperties'
    	CameraProperties=GPCameraProperties'GP_Archetypes.Camera.GPTPCameraProperties'
    }

  2. #2
    Skaarj
    Join Date
    May 2012
    Location
    Kazan
    Posts
    12

    Default

    reixons, perhaps I understood you wrong, but Did you enable Cinematic Mode in Kismet?

  3. #3
    Veteran

    Join Date
    Dec 2002
    Location
    A world of possibilities
    Posts
    5,818

    Default

    Enabling cinematic mode has nothing to do with whether the camera takes over the view or not. Anyway I'm not really a coder but there could be level based problems... nevertheless it would be hard to troubleshoot without seeing the kismet and matinee views. I think normally for matinee to control a camera there needs to be an instance of that camera in the map.. otherwise it might also work if you have the correct variable exposed via kismet. And that may be where the problem lays.
    Learn how to make games in Kismet or read about my projects here!
    I run the UnrealDB. Find answers. Feature projects. Get connected.
    About Me: (VoxHouse Studio Website)
    Join us on #udkc irc.gamesurge.net or click here: http://clodel-studios.com/UDKC to chat live with others in the UDK community.

  4. #4
    Palace Guard
    Join Date
    Mar 2008
    Posts
    3,581

    Default

    Matinee doesn't do anything with the player camera, you need to create a new camera object in your level which you would then add to Matinee and animate.

  5. #5
    MSgt. Shooter Person
    Join Date
    Jan 2012
    Posts
    31

    Default

    Ok I Solved the problem...There was a problem on the PlayerController class... My camera was coded in a way that didn't let any camera in kismet take the control of the perspective, as it was not inherited from UTPlayerController... Now it is solved. Thanks to everyone!


 

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.