# how can I make an object rotate when dragging mouse in another object

**URL:** <https://forums.unrealengine.com/t/how-can-i-make-an-object-rotate-when-dragging-mouse-in-another-object/2679085>\
**Category:** Blueprint\
**Tags:** unreal-engine\
**Created:** [November 26, 2025, 9:57pm UTC](https://forums.unrealengine.com/t/how-can-i-make-an-object-rotate-when-dragging-mouse-in-another-object/2679085 "2025-11-26T21:57:10Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ulisesyere](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ulisesyere](https://forums.unrealengine.com/u/ulisesyere)\
**Post date:** [November 26, 2025, 9:57pm UTC](https://forums.unrealengine.com/t/how-can-i-make-an-object-rotate-when-dragging-mouse-in-another-object/2679085/1 "2025-11-26T21:57:10Z")

</div>

Hi I think this is more of a me not knowing much math issue but anyway, I’ll try to explain as good as I can.

I have this object on my level

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/b/3/fb34cc366232de5937b51b88ef2d50ff227fd8af.jpeg)

the thing that is currently being seen on the screen is a scene capture component, I want to rotate that cene capture component when the user drags the mouse over the game’s computer’s screen. like what tablets or phones do when you zoom on a photo, that thing when you can move the photo around in gallery when you zoom it, the more you zoom the more you can move, I want to achieve the same effect here I already made the zoom part, changing the fov of the scene capture component, but I don’t know how to do the drag part (the dragging should only occur when dragging over the screen).

---

<div class="post-metadata">

**Author:** ![nande](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nande/32/1057698_2.png) [@nande](https://forums.unrealengine.com/u/nande)\
**Post date:** [November 27, 2025, 1:03am UTC](https://forums.unrealengine.com/t/how-can-i-make-an-object-rotate-when-dragging-mouse-in-another-object/2679085/2 "2025-11-27T01:03:32Z")

</div>

> [@ulisesyere](#):
>
> I already made the zoom part, changing the fov of the scene capture component,

i’d suggest you actually move the scene capture comp or the root instead of changing the fov. forward/backward is analogous to zoom, and sideways and up for panning.

while it would change how it looks, it would behave more consistent.

also a zoom wouldn’t change the fov, but scale, so it makes sense.

otherwise just scale the and pan the texture that you use to display the render target. that will look more accurate. it will pixelate, but that’s exactly what you would expect from a digital zoom.

---

<div class="post-metadata">

**Author:** ![kumacasia](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@kumacasia](https://forums.unrealengine.com/u/kumacasia)\
**Post date:** [November 27, 2025, 2:47am UTC](https://forums.unrealengine.com/t/how-can-i-make-an-object-rotate-when-dragging-mouse-in-another-object/2679085/3 "2025-11-27T02:47:45Z")

</div>

Drag to rotate Object in Another Actor 😁

---

<div class="post-metadata">

**Author:** ![ulisesyere](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ulisesyere](https://forums.unrealengine.com/u/ulisesyere)\
**Post date:** [November 27, 2025, 9:56pm UTC](https://forums.unrealengine.com/t/how-can-i-make-an-object-rotate-when-dragging-mouse-in-another-object/2679085/4 "2025-11-27T21:56:19Z")

</div>

Sorry, I think I didn’t fully explained this. I did consider that, but I discarded the idea since I need the rotation of the object containing the scene capture component to be the one to rotate (that object is not the computer shown in the image is another thing), but I need to zoom without moving the screen capture component from where it is, so no, unfortunately that solution does not work for me.

---

<div class="post-metadata">

**Author:** ![ulisesyere](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ulisesyere](https://forums.unrealengine.com/u/ulisesyere)\
**Post date:** [November 27, 2025, 9:56pm UTC](https://forums.unrealengine.com/t/how-can-i-make-an-object-rotate-when-dragging-mouse-in-another-object/2679085/5 "2025-11-27T21:56:47Z")

</div>

Hi, could you please elaborate more on your answer?

---

<div class="post-metadata">

**Author:** ![nande](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nande/32/1057698_2.png) [@nande](https://forums.unrealengine.com/u/nande)\
**Post date:** [November 28, 2025, 4:58am UTC](https://forums.unrealengine.com/t/how-can-i-make-an-object-rotate-when-dragging-mouse-in-another-object/2679085/6 "2025-11-28T04:58:35Z")

</div>

> [@ulisesyere](#):
>
> Hi, could you please elaborate more on your answer?

that account is llm spam, i’m confident. it just sumarizes and repeats what’s been discussed.

> [@ulisesyere](#):
>
> since I need the rotation of the object containing the scene capture component to be the one to rotate

sorry i really struggle to visualize that. could you put a picture or example of something similar in other games?

you can still zoom using the fov, and rotate moving the capture component if you use a good enough math, i think.

---

<div class="post-metadata">

**Author:** ![ulisesyere](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ulisesyere](https://forums.unrealengine.com/u/ulisesyere)\
**Post date:** [November 30, 2025, 6:16pm UTC](https://forums.unrealengine.com/t/how-can-i-make-an-object-rotate-when-dragging-mouse-in-another-object/2679085/7 "2025-11-30T18:16:33Z")

</div>

I cannot find a game that does exactly what I want, I want to make the screen capture component when I click and drag on the screen of the game’s computer.

---

<div class="post-metadata">

**Author:** ![ulisesyere](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ulisesyere](https://forums.unrealengine.com/u/ulisesyere)\
**Post date:** [December 8, 2025, 12:30am UTC](https://forums.unrealengine.com/t/how-can-i-make-an-object-rotate-when-dragging-mouse-in-another-object/2679085/8 "2025-12-08T00:30:42Z")

</div>

I got it working by my self, here is the code if anyone needs it  
use this to calculate the desired rotation

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/4/b/04beb2938f051d330b6630098531e59e9c922d09.png)

and use this to apply it

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/b/4/6b474f1b89f5e5fbf44d22f2aa6e0c0dd7a5ac10.png)

this is how it looks like
