How'd you guys cook or compile it? I had to remove the stuff in green in to make it work with 2.0
Code:
simulated function bool CalcThirdPersonCam( float fDeltaTime, out vector out_CamLoc, out rotator out_CamRot, out float out_FOV )
{
local vector CamStart, HitLocation, HitNormal, CamDir;
local float DesiredCameraZOffset;
ModifyRotForDebugFreeCam(out_CamRot);
CamStart = Location;
if ( bIsHero )
{
// use "hero" cam
SetHeroCam(out_CamRot);
}
else
{
DesiredCameraZOffset = (Health > 0) ? 1.5 * GetCollisionHeight() + Mesh.Translation.Z : 0.f;
CameraZOffset = (fDeltaTime < 0.2) ? DesiredCameraZOffset * 5 * fDeltaTime + (1 - 5*fDeltaTime) * CameraZOffset : DesiredCameraZOffset;
}
CamStart.Z += CameraZOffset;
CamDir = Vector(out_CamRot) * GetCollisionRadius() * CurrentCameraScale;
if ( (Health <= 0) || bFeigningDeath )
{
// adjust camera position to make sure it's not clipping into world
// @todo fixmesteve. Note that you can still get clipping if FindSpot fails (happens rarely)
FindSpot(GetCollisionExtent(),CamStart);
}
if ( CurrentCameraScale < CameraScale )
{
//DEBUG
//WarnInternal( "MKLOG -> MKPawn.CalcThirdPersonCam (was smaller): [PRIOR to Adjustment]CurrentCameraScale:" @ CurrentCameraScale );
//DEBUG
CurrentCameraScale = FMin( CameraScale, CurrentCameraScale + 5 * FMax( CameraScale - CurrentCameraScale, 0.3 )*fDeltaTime );
//DEBUG
//WarnInternal( "MKLOG -> MKPawn.CalcThirdPersonCam (was smaller): [After to Adjustment]CurrentCameraScale:" @ CurrentCameraScale );
//DEBUG
}
Bookmarks