Announcement

Collapse
No announcement yet.

How to Stop the Pitch from Zooming in the Player camera in third Person

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to Stop the Pitch from Zooming in the Player camera in third Person

    How to Stop the Pitch from Zooming in the Player camera in third Person. Why does this occur where do i need to go to fix it? its quite annoying


    When i Aim Upwards


    When i Aim straight <--- how i need it always

    #2
    any suggestions where is this code located?

    Comment


      #3
      i located this is this directly connected?
      Code:
      /**
       * Called from PlayerController UpdateRotation() -> ProcessViewRotation() to (pre)process player ViewRotation
       * adds delta rot (player input), applies any limits and post-processing
       * returns the final ViewRotation set on PlayerController
       *
       * @param	DeltaTime, time since last frame
       * @param	ViewRotation, actual PlayerController view rotation
       * @input	out_DeltaRot, delta rotation to be applied on ViewRotation. Represents player's input.
       * @return	processed ViewRotation to be set on PlayerController.
       */
      simulated function ProcessViewRotation( float DeltaTime, out rotator out_ViewRotation, out Rotator out_DeltaRot )
      {
      	// Add Delta Rotation
      	out_ViewRotation	+= out_DeltaRot;
      	out_DeltaRot		 = rot(0,0,0);
      	
      	out_ViewRotation.Pitch= clamp(out_ViewRotation.Pitch, 0  ,32768   );
      	// Limit Player View Pitch
      	if ( PlayerController(Controller) != None )
      	{
      		out_ViewRotation = PlayerController(Controller).LimitViewRotation( out_ViewRotation, ViewPitchMin, ViewPitchMax );
      	}
      }

      Comment


        #4
        Where is the code that's doing that? I'm sorry to say, I think it could be quite literally anywhere in your whole game. I don't see anything in the code you provided that looks like it would cause the problem you're showing in the screenshots.

        It looks to me like somewhere your camera's field of view is narrowing when you change the pitch. I would recommend searching your code for any mention of POV.FOV getting changed.

        Also, I'm not an expert programmer, but IMHO it might be helpful to code and test classes and functions in the smallest chunks as possible--preferably one at a time--so that you minimize the chances of asking yourself "Where in all of this entire game is the line that's causing this problem?"

        Comment

        Working...
        X