# How to set the camera field of view to an object？

**URL:** <https://forums.unrealengine.com/t/how-to-set-the-camera-field-of-view-to-an-object/1278359>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, question\
**Created:** [August 31, 2023, 3:08am UTC](https://forums.unrealengine.com/t/how-to-set-the-camera-field-of-view-to-an-object/1278359 "2023-08-31T03:08:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![TomHank](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tomhank/32/615012_2.png) [@TomHank](https://forums.unrealengine.com/u/TomHank)\
**Post date:** [August 31, 2023, 3:08am UTC](https://forums.unrealengine.com/t/how-to-set-the-camera-field-of-view-to-an-object/1278359/1 "2023-08-31T03:08:06Z")

</div>

I have a plane and I want to set the camera’s field of view to be filled by that plane, and if the plane is scaled, shifting position, The camera’s field of view is always filled with this plane.

---

<div class="post-metadata">

**Author:** ![Midisport\_8x8s](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Midisport\_8x8s](https://forums.unrealengine.com/u/Midisport_8x8s)\
**Post date:** [August 31, 2023, 12:16pm UTC](https://forums.unrealengine.com/t/how-to-set-the-camera-field-of-view-to-an-object/1278359/2 "2023-08-31T12:16:34Z")

</div>

I think you need to use maths for this. I will assume the plane is directly in front of the camera. You would need to get the sine of half width/height of the plane, divided by the distance to the plane. I think that should give you half the FOV, both vertically and horizontally. You would need to select the smallest FOV to ensure the plane fills the screen.

I am not sure if this is right, but it is a start.
