# How to replace the cursor with a 3d model?

**URL:** <https://forums.unrealengine.com/t/how-to-replace-the-cursor-with-a-3d-model/554497>\
**Category:** Feedback & Requests\
**Tags:** cursor, mouse-cursor, unreal-engine, UE5-0, question\
**Created:** [May 11, 2022, 10:08am UTC](https://forums.unrealengine.com/t/how-to-replace-the-cursor-with-a-3d-model/554497 "2022-05-11T10:08:59Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![TijerinArtStudio](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tijerinartstudio/32/482290_2.png) [@TijerinArtStudio](https://forums.unrealengine.com/u/TijerinArtStudio)\
**Post date:** [May 11, 2022, 10:09am UTC](https://forums.unrealengine.com/t/how-to-replace-the-cursor-with-a-3d-model/554497/1 "2022-05-11T10:09:00Z")

</div>

I am developing a “point and click” videogame and I want to replace the cursor that appears on the screen with a 3d model of a stick (yes a stick). The idea is that the stage light affects it so it can’t be an image, it has to be a 3d model.  
Can anyone think of a way to do this?

---

<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:** [May 11, 2022, 10:24am UTC](https://forums.unrealengine.com/t/how-to-replace-the-cursor-with-a-3d-model/554497/2 "2022-05-11T10:24:05Z")

</div>

Is it first person? You can just put the stick in front of the camera.

---

<div class="post-metadata">

**Author:** ![TijerinArtStudio](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tijerinartstudio/32/482290_2.png) [@TijerinArtStudio](https://forums.unrealengine.com/u/TijerinArtStudio)\
**Post date:** [May 12, 2022, 7:27am UTC](https://forums.unrealengine.com/t/how-to-replace-the-cursor-with-a-3d-model/554497/3 "2022-05-12T07:27:27Z")

</div>

Hello, no, the game is a classic point and click (i.e. the camera is fixed) and the camera does not advance or rotate. On screen, there is always a menu, so the way to interact with the game is by using the cursor.

---

<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:** [May 12, 2022, 7:39am UTC](https://forums.unrealengine.com/t/how-to-replace-the-cursor-with-a-3d-model/554497/4 "2022-05-12T07:39:23Z")

</div>

Got it. I’m assuming you don’t want the stick to be moving in and out of the scene, just staying near the screen plane, but also be a lit actor?

Some sort of world/screen mapping, lemme think a bit…

---

<div class="post-metadata">

**Author:** ![TijerinArtStudio](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tijerinartstudio/32/482290_2.png) [@TijerinArtStudio](https://forums.unrealengine.com/u/TijerinArtStudio)\
**Post date:** [May 12, 2022, 7:55am UTC](https://forums.unrealengine.com/t/how-to-replace-the-cursor-with-a-3d-model/554497/5 "2022-05-12T07:55:02Z")

</div>

Effectively, I just want the stick model to move with the cursor (then I would make the cursor invisible of course) in such a way that it looks like the tip of the stick is the cursor.  
I have been trying several options and another problem is that the 3D model would have to be above the menu buttons; I don’t know if this is impossible, to be honest, but I really appreciate your time.

---

<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:** [May 12, 2022, 8:12am UTC](https://forums.unrealengine.com/t/how-to-replace-the-cursor-with-a-3d-model/554497/6 "2022-05-12T08:12:55Z")

</div>

I had a go at this, don’t think it’s possible, I’m afraid.

The stick has to be away from the camera, so you can see it, which means it’s in the world. But to be able to operate the menus, you need to be on the screen.

Maybe someone comes along with a bright idea, but…

---

<div class="post-metadata">

**Author:** ![TijerinArtStudio](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tijerinartstudio/32/482290_2.png) [@TijerinArtStudio](https://forums.unrealengine.com/u/TijerinArtStudio)\
**Post date:** [May 12, 2022, 9:26am UTC](https://forums.unrealengine.com/t/how-to-replace-the-cursor-with-a-3d-model/554497/7 "2022-05-12T09:26:01Z")

</div>

I understand; thank you very much for your time. First of all, it occurred to me that the solution could be to make the physical menus also like the ones in the “Metro” videogame saga.  
 ![andrii-zelfit-mykhailov-untitled2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/8/a/38a95febbd0a97cb40c0f8b0d8137778472cf45b.gif)

But I can’t find references or people who have done it before, so I guess it’s not possible.

That said, thank you very much for your time.

---

<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:** [May 12, 2022, 9:34am UTC](https://forums.unrealengine.com/t/how-to-replace-the-cursor-with-a-3d-model/554497/8 "2022-05-12T09:34:17Z")

</div>

So the menus are on things in the game?

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/b/f/dbf423f846ee59d00d7462a1191633946d4ecf41.jpeg "WTF Is? Widget Interaction Component in Unreal Engine 4 ( UE4 )") ](https://www.youtube.com/watch?v=_1zWWabWof0)

---

<div class="post-metadata">

**Author:** ![TijerinArtStudio](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tijerinartstudio/32/482290_2.png) [@TijerinArtStudio](https://forums.unrealengine.com/u/TijerinArtStudio)\
**Post date:** [May 12, 2022, 10:11am UTC](https://forums.unrealengine.com/t/how-to-replace-the-cursor-with-a-3d-model/554497/9 "2022-05-12T10:11:16Z")

</div>

Wow! There is a moment in the video where he passes the mouse over the physical button and interacts! Maybe this is what I was looking for so long. Maybe it doesn’t solve the issue of the pointer being a 3D model; but it has been very helpful. I will see if I can do it too (I am still learning to use the program).

---

<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:** [May 12, 2022, 10:50am UTC](https://forums.unrealengine.com/t/how-to-replace-the-cursor-with-a-3d-model/554497/10 "2022-05-12T10:50:56Z")

</div>

If you’re ok with moving the stick around in the world, you can use it with a line trace, and interact with models.

So, the stick stays upright until it detects an intractable object, then it points at it:

![stick](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/d/8/1d86aca1e0cf7f00892d48b611263b59217fc05b.gif)

---

<div class="post-metadata">

**Author:** ![TijerinArtStudio](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tijerinartstudio/32/482290_2.png) [@TijerinArtStudio](https://forums.unrealengine.com/u/TijerinArtStudio)\
**Post date:** [May 12, 2022, 11:29am UTC](https://forums.unrealengine.com/t/how-to-replace-the-cursor-with-a-3d-model/554497/11 "2022-05-12T11:29:45Z")

</div>

Wow, I didn’t know that could be done. If it works by moving the stick instead of the camera, I’m certainly interested where can I find a tutorial to do that?

---

<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:** [May 12, 2022, 11:36am UTC](https://forums.unrealengine.com/t/how-to-replace-the-cursor-with-a-3d-model/554497/12 "2022-05-12T11:36:13Z")

</div>

Trouble is, I am moving the camera… that’s where the line trace is coming from 🙂

I’ll have a think about how to move just the stick…

---

<div class="post-metadata">

**Author:** ![Zikitamon](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/zikitamon/32/464606_2.png) [@Zikitamon](https://forums.unrealengine.com/u/Zikitamon)\
**Post date:** [May 12, 2022, 11:50am UTC](https://forums.unrealengine.com/t/how-to-replace-the-cursor-with-a-3d-model/554497/13 "2022-05-12T11:50:07Z")

</div>

I think you can solve the world space location of the mouse cursor using the APlayerController::GetHitResultUnderCursor function.

So how you do it:  
first call the GetHitResultUnderCursor with let’s say with the ECC\_Visibility Channel  
then you get the hit result which contains the location the trace hit  
subtract the camera location from the that location, and normalize it  
that way you can use multiplication to adjust the distance between the camera and the stick  
…  
I hope that actually works, I am not able to test it currently 😐

---

<div class="post-metadata">

**Author:** ![TijerinArtStudio](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tijerinartstudio/32/482290_2.png) [@TijerinArtStudio](https://forums.unrealengine.com/u/TijerinArtStudio)\
**Post date:** [May 12, 2022, 2:58pm UTC](https://forums.unrealengine.com/t/how-to-replace-the-cursor-with-a-3d-model/554497/14 "2022-05-12T14:58:02Z")

</div>

Hi, Thank you very much for replying, this is a lot of information for a beginner like me. I just found out what a “line trace” is and I am trying to implement it to work with a menu similar to “Metro”. When I get it, if I get it, I will try what you say.

---

<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:** [May 12, 2022, 4:51pm UTC](https://forums.unrealengine.com/t/how-to-replace-the-cursor-with-a-3d-model/554497/15 "2022-05-12T16:51:34Z")

</div>

I thought of a great way to do this, actually. If you’re ok with the stick entering into the scene…

---

<div class="post-metadata">

**Author:** ![TijerinArtStudio](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tijerinartstudio/32/482290_2.png) [@TijerinArtStudio](https://forums.unrealengine.com/u/TijerinArtStudio)\
**Post date:** [May 12, 2022, 5:01pm UTC](https://forums.unrealengine.com/t/how-to-replace-the-cursor-with-a-3d-model/554497/16 "2022-05-12T17:01:29Z")

</div>

Hello,  
of course I want to hear your idea! Just keep in mind that I am still learning and will need a very detailed explanation to understand you.

---

<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:** [May 12, 2022, 5:02pm UTC](https://forums.unrealengine.com/t/how-to-replace-the-cursor-with-a-3d-model/554497/17 "2022-05-12T17:02:58Z")

</div>

Ok, I’ll come back a bit later… 🙂

---

<div class="post-metadata">

**Author:** ![TijerinArtStudio](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tijerinartstudio/32/482290_2.png) [@TijerinArtStudio](https://forums.unrealengine.com/u/TijerinArtStudio)\
**Post date:** [May 12, 2022, 5:03pm UTC](https://forums.unrealengine.com/t/how-to-replace-the-cursor-with-a-3d-model/554497/18 "2022-05-12T17:03:13Z")

</div>

And sorry if I don’t answer you right away, on the other hand, [I’m replying to a post about playing videos inside unreal, apparently in the latest version of unreal there is something wrong and you can’t use them.](https://forums.unrealengine.com/t/the-video-doesnt-show-in-unreal-5/555378)

---

<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:** [May 12, 2022, 6:56pm UTC](https://forums.unrealengine.com/t/how-to-replace-the-cursor-with-a-3d-model/554497/19 "2022-05-12T18:56:43Z")

</div>

So I have 3 interactables here. When I press O, the stick goes to each of them in turn.

Tell me if this is of any use…

( I’m sort of imaging the stick to be a bit of a magic wand by now… )

![stickv3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/9/1/e91566316c8e5c77acfc5910e4f9585c43e71801.gif)

---

<div class="post-metadata">

**Author:** ![TijerinArtStudio](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tijerinartstudio/32/482290_2.png) [@TijerinArtStudio](https://forums.unrealengine.com/u/TijerinArtStudio)\
**Post date:** [May 12, 2022, 7:19pm UTC](https://forums.unrealengine.com/t/how-to-replace-the-cursor-with-a-3d-model/554497/20 "2022-05-12T19:19:19Z")

</div>

I love your idea! You really make magic. Please explain to me how to do that. I am learning how to use the “Line trace” but I am not able to connect “out hit” with “hit”:

 ![Temp](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/c/e/1ce0040bea02a34b11f83caaf6c86e8ead037e66.jpeg)  
I am still very much a beginner and I seem to be following too old a tutorial to do this.

[Next page](https://forums.unrealengine.com/t/how-to-replace-the-cursor-with-a-3d-model/554497.md?page=2)
