How to change FOV, look offset, etc within code?

JasonX

New member
Hi,
I'm just wondering how can we change the view type (like look offset and field of view with code)?

During conversation for example I want to change the look offset of my character (with Lerping, so it's smooth). Just changing the view type is too fast (there is not lerping).

Is there an API documentation somewhere?
 
First "get" the viewtype, or do a for loop for all of them, you can then set the field of view here is a tiny example from my asset.

C#:
 Opsive.UltimateCharacterController.FirstPersonController.Camera.ViewTypes.FreeLook fl =
                            cameraController.GetViewType<Opsive.UltimateCharacterController.FirstPersonController.Camera.ViewTypes.FreeLook>();

                    fl.MaxPitchLimit = pl;
                    fl.MinPitchLimit = -pl;
                    fl.MaxYawLimit = yl;
                    fl.MinYawLimit = -yl;
                    if (seat.FieldOfView != -1)
                      fl.FieldOfView = seat.FieldOfView;
 
Top