Results 1 to 1 of 1
  1. #1
    MSgt. Shooter Person
    Join Date
    Dec 2010
    Posts
    291

    Default my Question about Socket and Pawn ...!

    Hi;

    In my test game (as a First-Person Shooter game) , I add a socket to my pawn called "NeckSocket", then I use the Location and Rotaion of that socket to modify my camera rotation and location.
    Everything is ok, but the Pawn's Hand and Gun mesh , Flickers and jitters , on camera rotation. When pawn walks, the camera follows the pawn after a delay...!
    The question is , why these flickers and delays happens ...?


    Pawn Codes:

    Code:
    class thePawn extends Pawn;
    ...
    
    simulated function Tick(float DeltaTime)
    {
         local Vector NeckSocketLocation;
         local Rotator NeckSocketRotation;
    ...
    
         self.Mesh.GetSocketWorldLocationAndRotation('NeckSocket',NeckSocketLocation,NeckSocketRotation);
         
         GVars.NeckSLoc = NeckSocketLocation;
         GVars.NeckSRot = NeckSocketRotation;
    
    ...

    Camera codes:

    Code:
    class theCamera extends Camera;
    
    ...
    
    var MSD_GameInfo GVars;
    
    function PreBeginPlay()
    {
    	GVars = MSD_GameInfo(self.WorldInfo.Game);	
    }
    
    function UpdateViewTarget(out TViewTarget OutVT, float DeltaTime)
    {	
    	OutVT.POV.Location = GVars.NeckSLoc;
    	OutVT.POV.Rotation = GVars.NeckSRot;
    }
    Thanks.
    Last edited by Masoud; 03-23-2012 at 06:12 AM.


 

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.