# I want a prop to rotate to where the player is looking.

**URL:** <https://forums.unrealengine.com/t/i-want-a-prop-to-rotate-to-where-the-player-is-looking/1134069>\
**Category:** Verse\
**Tags:** unreal-engine, unreal-editor-for-fortnite, fortnite-creative, question, fortnite\
**Created:** [April 20, 2023, 1:31am UTC](https://forums.unrealengine.com/t/i-want-a-prop-to-rotate-to-where-the-player-is-looking/1134069 "2023-04-20T01:31:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![AgentJonesyFN1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AgentJonesyFN1](https://forums.unrealengine.com/u/AgentJonesyFN1)\
**Post date:** [April 20, 2023, 1:31am UTC](https://forums.unrealengine.com/t/i-want-a-prop-to-rotate-to-where-the-player-is-looking/1134069/1 "2023-04-20T01:31:40Z")

</div>

So I don’t know how to do so a prop follows the player’s looking direction. So far I got a code that follows the player, and it works pretty well, but I want that same prop to rotate where the player is looking. I am doing a flashlight, and, like I said it works pretty well, I used a spotlight and it looks like a flashlight, but I want this same prop to rotate to where the player is looking.

This is the code:

```auto
prop_follows_player_device := class(creative_device):

    @editable
    FollowerProp : creative_prop = creative_prop{}

    DoFollowPlayer()<suspends> : void =
        loop:
            if (PlayerList := GetPlayspace().GetPlayers(), FortniteCharacter := PlayerList[0].GetFortCharacter[]):
                PlayerPosition : vector3 = FortniteCharacter.GetTransform().Translation
                FollowerProp.MoveTo(PlayerPosition, rotation{},0.2)                
                
            else:
                break
            Print("Follow")
    # Runs when the device is started in a running game
    OnBegin<override>()<suspends>:void=

        DoFollowPlayer()

```

---

<div class="post-metadata">

**Author:** ![CosmicDanAU](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/cosmicdanau/32/642728_2.png) [@CosmicDanAU](https://forums.unrealengine.com/u/CosmicDanAU)\
**Post date:** [April 20, 2023, 3:51am UTC](https://forums.unrealengine.com/t/i-want-a-prop-to-rotate-to-where-the-player-is-looking/1134069/2 "2023-04-20T03:51:28Z")

</div>

You can simply call `GetViewRotation()` on your FortCharacter to get the current _look_ rotation of the player. So to make something have the same rotation that the player is aiming, just do:

`FollowerProp.MoveTo(PlayerPosition, FortniteCharacter.GetViewRotation(), 0.2)`

Pro tip: It’s worth reading/skimming through the entire `Fortnite.digest.verse` file at least once, so you at least give your brain a hint on what can be done and where 🙂 Also the other two verse digests are useful to skim, though do be aware that some things are not yet applicable (e.g. placeholder classes and such).

---

<div class="post-metadata">

**Author:** ![AgentJonesyFN1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AgentJonesyFN1](https://forums.unrealengine.com/u/AgentJonesyFN1)\
**Post date:** [April 20, 2023, 10:39am UTC](https://forums.unrealengine.com/t/i-want-a-prop-to-rotate-to-where-the-player-is-looking/1134069/3 "2023-04-20T10:39:39Z")

</div>

Really appreciate your help 🙏

---

<div class="post-metadata">

**Author:** ![AgentJonesyFN1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AgentJonesyFN1](https://forums.unrealengine.com/u/AgentJonesyFN1)\
**Post date:** [April 20, 2023, 3:47pm UTC](https://forums.unrealengine.com/t/i-want-a-prop-to-rotate-to-where-the-player-is-looking/1134069/4 "2023-04-20T15:47:23Z")

</div>

> [@CosmicDanAU](#):
>
> Fortnite.digest.verse

It works perfect!, But for some reason if I turn around the light starts moving like crazy, even if i don’t move the camera at all, do you know a workaround for this? =)

---

<div class="post-metadata">

**Author:** ![CosmicDanAU](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/cosmicdanau/32/642728_2.png) [@CosmicDanAU](https://forums.unrealengine.com/u/CosmicDanAU)\
**Post date:** [May 3, 2023, 3:42am UTC](https://forums.unrealengine.com/t/i-want-a-prop-to-rotate-to-where-the-player-is-looking/1134069/5 "2023-05-03T03:42:57Z")

</div>

It might be colliding with something. As a test, try to make the prop floating in the sky. If that’s no good, then I’m not sure - how exactly are you turning around without moving the camera? Doesn’t one require the other?
