# 画面の中心に近い順に敵をロックオンできるようになりたい。

**URL:** <https://forums.unrealengine.com/t/topic/767905>\
**Category:** 日本語 (Japanese)\
**Tags:** unreal-engine, question\
**Created:** [February 10, 2023, 9:09am UTC](https://forums.unrealengine.com/t/topic/767905 "2023-02-10T09:09:54Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [February 10, 2023, 9:18am UTC](https://forums.unrealengine.com/t/topic/767905/2 "2023-02-10T09:18:54Z")

</div>

> [@29saidesu](#):
>
> 操作キャラクターからコリジョンを出して、それに触れていてかつ、キャラクターに近い順にロックオンできるようにはしたのですが、これをコリジョンに触れていて、画面の中心に近い順にロックオンできるようになりたいのですが、どのようにしたら良いのでしょうか？  
> 色々と調べていますが、出てきません。

どうやら、これはそれを行います

> [@Line Trace from screen center to world](https://forums.unrealengine.com/t/line-trace-from-screen-center-to-world/295399/7):
>
> I guess that’s because the Z value you add is too low. Look in the components tab at what height your camera is and use this for the Z value instead of “Base Eye Height”.

---

_[View the full topic](https://forums.unrealengine.com/t/topic/767905)._
