# GetViewRotation Help

**URL:** <https://forums.unrealengine.com/t/getviewrotation-help/1140968>\
**Category:** Verse\
**Tags:** unreal-engine, unreal-editor-for-fortnite, fortnite-creative, question, fortnite\
**Created:** [April 25, 2023, 7:29pm UTC](https://forums.unrealengine.com/t/getviewrotation-help/1140968 "2023-04-25T19:29:23Z")\
**Posts on this page:** 4\
**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 25, 2023, 7:29pm UTC](https://forums.unrealengine.com/t/getviewrotation-help/1140968/1 "2023-04-25T19:29:23Z")

</div>

Hi, so what I’m trying to do is make a working flashlight (because the already existing one isn’t cool to me), and what I’ve got so far is the prop following the player’s location and the view rotation, so if i look to one place the flashlight will look at the same place, but for some odd reason (That I don’t understand) the spotlight (or any other mesh) will start moving very crazy when looking to the left or to the right, in the video we’ll see the light flickering but that’s fine due to the 0.2 delay. In the video you’ll see a moment where the light will be gone and will start to move very crazy. I have removed any type of collision to this Prop but still got no solution. The light follows the player correctly but the viewrotation has some odd thing that I just explained. You can check the following video and the code below is the one I used.  
(Sorry if the video quality isn’t that great…)

[https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/e/c/decb6bbefe31ca6f566a3f2eef4ef56cd53584ed.mp4](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/e/c/decb6bbefe31ca6f566a3f2eef4ef56cd53584ed.mp4)

```auto
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /Fortnite.com/Characters }
using { /UnrealEngine.com/Temporary/SpatialMath }

source_light := 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, FortniteCharacter.GetViewRotation(), 0.2)             
                
            else:
                break
            Print("Follow")
    OnBegin<override>()<suspends>:void=

        DoFollowPlayer()

```

---

<div class="post-metadata">

**Author:** ![TritonSailor](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TritonSailor](https://forums.unrealengine.com/u/TritonSailor)\
**Post date:** [April 25, 2023, 11:30pm UTC](https://forums.unrealengine.com/t/getviewrotation-help/1140968/2 "2023-04-25T23:30:49Z")

</div>

I’ve seen that kind of behavior from similar code. I’ve debugged by printing out GetViewRotation() values, which appear correct, but MoveTo starts causing crazy rotations once GetViewRotation() is moved past certain range it seems.

---

<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 26, 2023, 9:34am UTC](https://forums.unrealengine.com/t/getviewrotation-help/1140968/3 "2023-04-26T09:34:56Z")

</div>

😭

---

<div class="post-metadata">

**Author:** ![PledgedRanger](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/pledgedranger/32/1039255_2.png) [@PledgedRanger](https://forums.unrealengine.com/u/PledgedRanger)\
**Post date:** [May 19, 2024, 4:26am UTC](https://forums.unrealengine.com/t/getviewrotation-help/1140968/4 "2024-05-19T04:26:01Z")

</div>

Yes my MoveTo() Function is also causing the creative\_prop to Flash/flicker and is a nightmare to work with
