# Moving an object by pointing another object at it

**URL:** <https://forums.unrealengine.com/t/moving-an-object-by-pointing-another-object-at-it/1657869>\
**Category:** Blueprint\
**Tags:** unreal-engine, question, Blueprint\
**Created:** [February 1, 2024, 10:00am UTC](https://forums.unrealengine.com/t/moving-an-object-by-pointing-another-object-at-it/1657869 "2024-02-01T10:00:36Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [February 1, 2024, 10:38am UTC](https://forums.unrealengine.com/t/moving-an-object-by-pointing-another-object-at-it/1657869/2 "2024-02-01T10:38:55Z")

</div>

> [@wolfear87](#):
>
> how it would go back to its original position when not casting the trace

See if this 👇 helps with this 👆 particular bit.

- a standard forward camera trace:

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

You’d use an interface or inheritance if there are more types to handle, ofc.

- not sure how you want stuff to move, here it’s via a timeline:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/3/a/23ae2a94536e186793336e31f4ba8b19d9695695.png)

- which results in:

- the branches in the script prevent it from spamming since we’re tracing on Tick:

Hopefully you can adapt it to your needs.

* * *

It’s a setup similar to this one:

> [@Third person crosshair object highlight troubles](https://forums.unrealengine.com/t/third-person-crosshair-object-highlight-troubles/252041/13):
>
> The communication in the example revolves around Inheritance + Interface - a potent combo, imho. the base class implements the interface (which children inherit) the widget uses the same interface - calls children receive can be propagated: Actor → Widget Component → Widget without casting or finding user widgets (this can be done in many ways, though) the player has a collision sphere and sends an interface call to overlapped actors as we approach: [image] [image] Above, handl…

---

_[View the full topic](https://forums.unrealengine.com/t/moving-an-object-by-pointing-another-object-at-it/1657869)._
