Advertisement
MonsOlympus

Untitled

Apr 14th, 2011
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class NSCamera extends object;
  2.  
  3. var float CamOffsetDistance; //distance to offset the camera from the player
  4. var int IsoCamAngle; //pitch angle of the camera
  5. var NSPawn NSPawn;
  6.  
  7. simulated function bool CalcCamera( float fDeltaTime, out vector out_CamLoc, out rotator out_CamRot, out float out_FOV )
  8. {
  9.    out_CamLoc = NSPawn.Location;
  10.    out_CamLoc.X -= Cos(IsoCamAngle * UnrRotToRad) * CamOffsetDistance;
  11.    out_CamLoc.Z += Sin(IsoCamAngle * UnrRotToRad) * CamOffsetDistance;
  12.  
  13.    out_CamRot.Pitch = -1 * IsoCamAngle;  
  14.    out_CamRot.Yaw = 0;
  15.    out_CamRot.Roll = 0;
  16.  
  17.    return true;
  18. }
  19.  
  20. simulated singular event Rotator GetBaseAimRotation()
  21. {
  22.    local rotator   POVRot, tempRot;
  23.  
  24.    tempRot = NSPawn.Rotation;
  25.    tempRot.Pitch = 0;
  26.    NSPawn.SetRotation(tempRot);
  27.    POVRot = NSPawn.Rotation;
  28.    POVRot.Pitch = 0;
  29.  
  30.    return POVRot;
  31. }  
  32.  
  33. defaultproperties
  34. {
  35.     IsoCamAngle=5778 //35.264 degrees, 6420 orginal (9/10 currently)
  36.     CamOffsetDistance=1024.0
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement