Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class NSCamera extends object;
- var float CamOffsetDistance; //distance to offset the camera from the player
- var int IsoCamAngle; //pitch angle of the camera
- var NSPawn NSPawn;
- simulated function bool CalcCamera( float fDeltaTime, out vector out_CamLoc, out rotator out_CamRot, out float out_FOV )
- {
- out_CamLoc = NSPawn.Location;
- out_CamLoc.X -= Cos(IsoCamAngle * UnrRotToRad) * CamOffsetDistance;
- out_CamLoc.Z += Sin(IsoCamAngle * UnrRotToRad) * CamOffsetDistance;
- out_CamRot.Pitch = -1 * IsoCamAngle;
- out_CamRot.Yaw = 0;
- out_CamRot.Roll = 0;
- return true;
- }
- simulated singular event Rotator GetBaseAimRotation()
- {
- local rotator POVRot, tempRot;
- tempRot = NSPawn.Rotation;
- tempRot.Pitch = 0;
- NSPawn.SetRotation(tempRot);
- POVRot = NSPawn.Rotation;
- POVRot.Pitch = 0;
- return POVRot;
- }
- defaultproperties
- {
- IsoCamAngle=5778 //35.264 degrees, 6420 orginal (9/10 currently)
- CamOffsetDistance=1024.0
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement