In my game I want to allow the player to move whilst ignoring the view rotation of the Pawn so say when the player presses W they run forward no matter what direction they are looking in, now I had it working before I updated to the latest version of UDK and now it is stopped.
This is the code I was using before.
Any ideas how to get it working once again? CheersCode:class MyPlayerInput extends PlayerInput; event PlayerInput( float DeltaTime ) { local MyPawn P; local int rot, up; local Rotator MinRot, MaxRot; rot = Rotation.Yaw; up = Rotation.Pitch; P = MyPawn(PlayerCamera.PCOwner.Pawn); if(P != None) { if(P.north == true) { aForward = -aBaseY; aStrafe = -aStrafe; MinRot.Yaw = 20000; MinRot.Pitch = up; MaxRot.Yaw = 40000; MaxRot.Pitch = up; } } if(rot >= MinRot.Yaw && rot <= MaxRot.Yaw) { aTurn = aBaseX + aMouseX * 10; } if(rot <= MinRot.Yaw) { MinRot.Pitch = up; SetRotation(MinRot); } if(rot >= MaxRot.Yaw) { MaxRot.Pitch = up; SetRotation(MaxRot); } if(aLookUp == 0) aLookUp = aBaseY + aMouseY * 10; } DefaultProperties { }




Reply With Quote



Bookmarks