How to Set a Minimum Length for the Camera Spring Arm

I am using the Third Person Blueprint Template. By default, the camera’s Spring Arm shortens whenever the camera collides with any level geometry. Is there a way to set a minimum length for the Spring Arm? Right now the camera will zoom right up to, and underneath, the pawn when you try to look up; I want the camera to stop zooming at a certain distance and not zoom in any further. How do I set that up? Thanks.

1 Like

Hi Jonathan,

In the MyCharacter Blueprint in the Third Person Template you can disable the Camera Boom by unchecking the “Do Collision Test” in the details panel for the CameraBoom component. (see image if you need a reference) This will keep the camera at the position it is sitting in the components view of the Blueprint. It will not adhere to any blocking or BSP volumes that cause the camera to shift closer to the character using the SpringArm. This will cause the camera to clip through any meshes and BSP in the level.

9007-cameracollision.png

You may find this to be a problem though. It depends on what you’re trying to achieve. I do want to suggest that you should leave it on but adjust the settings to give you something more effective.

Adjusting the “Probe Size” to something like 1 will allow the camera to be blocked by the wall but it won’t clip the player mesh as it does by default.

You can also adjust and place the camera relative to where you would like it sit as well to get a different look.

If you’re still needing help with this feel free to ask!

Thank you!

Tim

I did some experimenting with adjusting the probe size and disabling Do Collision Test, but couldn’t get exactly what I’m wanting.

I want to have an RTS style camera, which allows for full rotation around an invisible “player”, but once the camera collides with the ground plane it will not rotate down any more; hence it won’t zoom in, or clip through the ground. Any thoughts on how to accomplish that?

Hi Jonathan,

You would need to setup the controls for the camera using Blueprints to control its movement or lack there of. There is a post on how to setup a Moba style camera that may give you some pointers in getting started with locking your camera movement to what you’d like to do.

Check it out and see what you can do! :slight_smile:

https://answers.unrealengine.com/questions/29764/moba-like-camera-movement.html

Something like this would also be a good discussion for the Forums.

Thank you!

Tim

After looking at the post you suggested, I dug a little deeper and ended up reviewing the APlayerCameraManager class (APlayerCameraManager | Unreal Engine Documentation). This had exactly what I needed.

All I had to do to get my desired camera effect was create a Blueprint subclass of PlayerCameraManager, update the PlayerController to use the new PlayerCameraManager instance, and then adjust the value of ViewPitchMax inside the PlayerCameraManager from 89.9 to 0. Now the camera stops just above the ground. Thanks for pointing me in the right direction.

1 Like

Great! Glad you got the solution!

Good luck on your project!

Tim

Dumb question here. How did you create the Player Camera Manager Blueprint? When I try to do it from the one in the Outliner it just crashes Unreal.

I create one inside the Content Browser by clicking on the New button, then Blueprint, then searching for PlayerCameraManager as the parent class.