# setting and printing player position and rotation

**URL:** <https://forums.unrealengine.com/t/setting-and-printing-player-position-and-rotation/813959>\
**Category:** Verse\
**Tags:** unreal-engine, question\
**Created:** [March 23, 2023, 11:33pm UTC](https://forums.unrealengine.com/t/setting-and-printing-player-position-and-rotation/813959 "2023-03-23T23:33:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![SyntaxzError](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SyntaxzError](https://forums.unrealengine.com/u/SyntaxzError)\
**Post date:** [March 23, 2023, 11:33pm UTC](https://forums.unrealengine.com/t/setting-and-printing-player-position-and-rotation/813959/1 "2023-03-23T23:33:57Z")

</div>

Hello Everyone!

I’m pretty new to programming in uefn with verse and i can’t find any documentation over player setting player rotations. The code i have underneath does get the player rotation but I haven’t found a way to actually print the results because of an argument is an incompatible value of type rotation error

Code

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

movement_device := class(creative_device):

    OnBegin<override>()<suspends>:void=
        AllPlayers := GetPlayspace().GetPlayers()
        for (Agent : AllPlayers, Player := player[Agent], FortCharacter := Player.GetFortCharacter[]):
            Rot := FortCharacter.GetViewRotation()
            Print(Rot)

```

ErrorMsg

```auto
This function parameter expects a value of type tuple([]char,?Duration:float = ...,?Color:color = ...), but this argument is an incompatible value of type rotation.(3509)

```

---

<div class="post-metadata">

**Author:** ![Dee\_Kay\_Bee](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Dee\_Kay\_Bee](https://forums.unrealengine.com/u/Dee_Kay_Bee)\
**Post date:** [March 24, 2023, 12:49am UTC](https://forums.unrealengine.com/t/setting-and-printing-player-position-and-rotation/813959/2 "2023-03-24T00:49:50Z")

</div>

Not having looked at verse, the input to Print is a String (not a Rot), similar to the blueprint equivalent. In Blueprints they automatically convert your connections (where possible), so you may have to convert Rot to a String before using it as an argument.

Note the question marks before the other parameters, this probably means they are optionally required (defaulted).

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/5/0/250c88215e1d684d8315abe8649dad3ef06d1cff.png)

---

<div class="post-metadata">

**Author:** ![SyntaxzError](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SyntaxzError](https://forums.unrealengine.com/u/SyntaxzError)\
**Post date:** [March 24, 2023, 8:00am UTC](https://forums.unrealengine.com/t/setting-and-printing-player-position-and-rotation/813959/3 "2023-03-24T08:00:32Z")

</div>

found the solution for this, i was mission the import  
`using { /UnrealEngine.com/Temporary/SpatialMath }`

this is the code on how to print the rotation in Verse

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

hello_world_device := class(creative_device):

    OnBegin<override>()<suspends>:void=
        AllPlayers := GetPlayspace().GetPlayers()
        for (Agent : AllPlayers, Player := player[Agent], FortCharacter := Player.GetFortCharacter[]):
            Rot := FortCharacter.GetViewRotation()
            Print("{Rot}")

```

I am still gonna look on how to rotate an player but that will be for later

---

<div class="post-metadata">

**Author:** ![Tasty\_Snak](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tasty_snak/32/550507_2.png) [@Tasty\_Snak](https://forums.unrealengine.com/u/Tasty_Snak)\
**Post date:** [June 30, 2023, 1:44am UTC](https://forums.unrealengine.com/t/setting-and-printing-player-position-and-rotation/813959/4 "2023-06-30T01:44:09Z")

</div>

> [@SyntaxzError](#):
>
> look on how to rotate an player but that will be for late

Did you figure out how to set the player’s rotation?

---

<div class="post-metadata">

**Author:** ![MegaBilly](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/megabilly/32/762612_2.png) [@MegaBilly](https://forums.unrealengine.com/u/MegaBilly)\
**Post date:** [July 11, 2023, 7:13am UTC](https://forums.unrealengine.com/t/setting-and-printing-player-position-and-rotation/813959/5 "2023-07-11T07:13:44Z")

</div>

I was able to set the Player’s Position/Rotation using this: Agent.Respawn(pos, rot)

[https://dev.epicgames.com/documentation/en-us/uefn/verse-api/fortnitedotcom/fortplayerutilities/respawn](https://dev.epicgames.com/documentation/en-us/uefn/verse-api/fortnitedotcom/fortplayerutilities/respawn)
