# How to move camera to object

**URL:** <https://forums.unrealengine.com/t/how-to-move-camera-to-object/1893618>\
**Category:** Blueprint\
**Tags:** unreal-engine, question, Blueprint\
**Created:** [June 7, 2024, 9:26am UTC](https://forums.unrealengine.com/t/how-to-move-camera-to-object/1893618 "2024-06-07T09:26:23Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![AllGamesSuck](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AllGamesSuck](https://forums.unrealengine.com/u/AllGamesSuck)\
**Post date:** [June 7, 2024, 9:26am UTC](https://forums.unrealengine.com/t/how-to-move-camera-to-object/1893618/1 "2024-06-07T09:26:23Z")

</div>

Hi, I’m trying to have the player camera (first person) move to an object in the scene when I click on it. I have the “clicking on the object to do something” part all done (not important). It’s the moving camera part I’m struggling with.  
I tried this:

 ![Capture](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/b/2/1b2db06bfb994058933c05a22b12ff0a2eb4558b.png)  
… and it does move the camera to the object, but it doesn’t rotate.  
What am I doing wrong? Is there a better way to do this? Thanks.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [June 7, 2024, 9:42am UTC](https://forums.unrealengine.com/t/how-to-move-camera-to-object/1893618/2 "2024-06-07T09:42:48Z")

</div>

> What am I doing wrong?

Do you want to _zoom in_ (alter Field of View) or _move_ the camera - these are 2 completely different things. You talk about zooming in but attempt to move it instead. Please clarify.

The rotation does not work because the first person camera inherits Control Rotation from the Player Controller or the Pawn which simply overrides the behaviour in this case. It can be changed run-time but can be tricky to work with.

If you want to proceed this way, disable the camera’s `Use Pawn Control Rotation`, and enable it once the camera reverts.

* * *

> Is there a better way to do this?

Perhaps you want to switch to another camera, as in:

- the player clicks an object to inspect it
- the camera view changes to see the object better

This is usually done via `Set View Target with Blend` node which also provides a rudimentary animation. It’s by far the most common way to do that kind of thing.

---

<div class="post-metadata">

**Author:** ![AllGamesSuck](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AllGamesSuck](https://forums.unrealengine.com/u/AllGamesSuck)\
**Post date:** [June 7, 2024, 9:55am UTC](https://forums.unrealengine.com/t/how-to-move-camera-to-object/1893618/3 "2024-06-07T09:55:29Z")

</div>

Thanks. Sorry, I used the wrong word. No, I’m not trying to do anything related to Field of View. Like you said, I’m trying to:

> [@Everynone](#):
>
> - the player clicks an object to inspect it
> - the camera view changes to see the object better

The object is a flat screen on a wall, in this case. I tried to use `Set View Target with Blend` node, but the rotation is all wrong, the camera clips through the object and ends up at the wrong angle. And I have no option to control the coordinates with that node, in case I want to set a certain distance from the camera to the object.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [June 7, 2024, 9:56am UTC](https://forums.unrealengine.com/t/how-to-move-camera-to-object/1893618/4 "2024-06-07T09:56:43Z")

</div>

Does the _flat screen on the wall_ have a camera we can to blend to? In order to blend, you need a camera on the target actor, if you do not provide one, default transform will be used.

The flat screen should look like this:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/d/3/7d36784602368ed72a695fa5b7da58930df6920c.jpeg)

Then you can blend with no issues.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [June 7, 2024, 9:59am UTC](https://forums.unrealengine.com/t/how-to-move-camera-to-object/1893618/6 "2024-06-07T09:59:56Z")

</div>

Either give the flat screen a camera (as above) or spawn a new camera dynamically.

---

<div class="post-metadata">

**Author:** ![AllGamesSuck](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AllGamesSuck](https://forums.unrealengine.com/u/AllGamesSuck)\
**Post date:** [June 7, 2024, 10:00am UTC](https://forums.unrealengine.com/t/how-to-move-camera-to-object/1893618/7 "2024-06-07T10:00:57Z")

</div>

Got it. Thanks a lot. So, I add camera to object, and when I’m done I use the same node to revert back, right?

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [June 7, 2024, 10:02am UTC](https://forums.unrealengine.com/t/how-to-move-camera-to-object/1893618/8 "2024-06-07T10:02:39Z")

</div>

Yeah, to go back you provide the Pawn as New View Target:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/7/1/a7119c5b949709ef105824a76d4deb22141c19f4.png)

I’d keep the functionality either in the Pawn or the Player Controller. Unless the flat screen has a bunch of controls, like flipping through the channels or some fancy remote cctv controls.

---

<div class="post-metadata">

**Author:** ![AllGamesSuck](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AllGamesSuck](https://forums.unrealengine.com/u/AllGamesSuck)\
**Post date:** [June 7, 2024, 10:05am UTC](https://forums.unrealengine.com/t/how-to-move-camera-to-object/1893618/9 "2024-06-07T10:05:36Z")

</div>

Thanks. The screen does have controls on it. I’m using a 3d widget component.

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [July 7, 2024, 10:06am UTC](https://forums.unrealengine.com/t/how-to-move-camera-to-object/1893618/10 "2024-07-07T10:06:03Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
