[BUG] Camera Yaw (and maybe pitch) not clamping as expected.

DankP3

Active member
Setup: Using adventure 3rd person on both camera and character. I set camera yaw limits to -90 and +180, meaning the camera should be able to yaw around the player in a 270 degree arc. If I yaw one way it clamps fine. If I yaw the other when it hits the limit it jumps to the other side. In other words, each yaw should be clamped to its own limit, but this doesn't appear the case with wide yaw angles. I assume the pitch limiting code may be the same, but have not tested.

Nolan in demo agility seen setup as above: https://drive.google.com/open?id=1jUF3MyAd6wkdRqHkdWwmDyYP1G5vMHRW
 
Thanks for letting me know. It looks like it's an issue with clamping the angle between a custom range and then interpolating the result. I'll have this fixed for the next version (which we should be able to release on the opsive store this week and then the Asset Store after)
 
@Justin , I fear this may still be broken. Whilst improved, with fast continuous mouse movements, where you would expect the camera yaw to stop, it can still spin around Nolan.
 
Within the demo scene I set the yaw limit of the adventure view to -90 to 180. I then rotated the camera and also rotated the character but the yaw angle was always limited correctly. With this setup if I move right the camera does start to spin but this makes sense because the rotation is always limited to the relative yaw offset of the character. Did I setup anything incorrectly?
 
OK, thanks. I'll have to test this again. I was not rotating the character and with the clamp I do not expect the camera to transit all around the character ('spin'). With a non moving character I expect the camera to lock as soon as it reaches one of the clamps and this is not what I saw when the mouse was moved quickly.
 
@Justin , so I think the camera should never pass through the 'forbidden arc'. As far as I can tell, the camera, when mouse is moved fast enough, jumps to the other side of the character via the 'forbidden zone' - this is how I interpret the spin (I am always using player Adventure and camera Adventure so the player never moves/rotates).

I think common expectation would be that it simply should not move past that clamp point, which essentially means remaining static, no matter how fast the mouse is moving, almost as if the mouse axis direction should be considered when clamping.

At the moment I get the impression that if the mouse moved sufficient for a 100degree yaw, for example, in the above discussed example, the clamp says 'well that would put it in the correct zone and I don't care how it got there'? Whereas I think it should say 'it would be in a safe zone but I cant get there that way'.
 
I think what you are seeing is the Yaw Limit Lerp Speed. If you change that to 1 then it will completely clamp at the limit without any bounce.

Edit: I tightened up the limit and am seeing it circle - I'll take a closer look at it.
 
Last edited:
Is there anyway to get the Yaw Limits to work with the third person combat view type?

Also the restrict Rotation ability seems to be restricting along the forward access (Z) instead of the expected Up Axis. Any suggestions?

thanks,
rich
 
The Combat view type rotates to the same rotation as the character so yaw limits doesn't apply.

The restrict rotation ability is relative to the forward direction of the character's up axis. If you enable Relative Look Source you can also account for the camera's local y offset.
 
Top