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:
Thanks.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; }



Reply With Quote

Bookmarks