Created
June 11, 2012 04:43
-
-
Save Bobbias/2908542 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyPawn extends UTPawn; | |
simulated function bool CalcCamera(float fDeltaTime, out vector out_CamLoc, out rotator out_CamRot, out float out_FOV) | |
{ | |
local vector start, end, hl, hn; | |
local actor a; | |
start = Location; | |
if (Controller != none) | |
{ | |
end = Location - Vector(Controller.Rotation) * 192.f; | |
} | |
else | |
{ | |
end = Location - Vector(Rotation) * 192.f; | |
} | |
a = Trace(hl, hn, end, start, false); | |
if (a != none) | |
{ | |
out_CamLoc = hl; | |
} | |
else | |
{ | |
out_CamLoc = end; | |
} | |
out_CamRot = Rotator(Location - out_CamLoc); | |
return true; | |
} | |
defaultproperties | |
{ | |
Begin Object Name=WPawnSkeletalMeshComponent | |
bOwnerNoSee=false | |
End Object | |
Name="Default__MyPawn" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment