# Problem with player rotation by mouse

**URL:** <https://phaser.discourse.group/t/problem-with-player-rotation-by-mouse/5867>\
**Category:** Phaser 3\
**Created:** [April 10, 2020, 11:43am UTC](https://phaser.discourse.group/t/problem-with-player-rotation-by-mouse/5867 "2020-04-10T11:43:06Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![BlunT76](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/blunt76/32/1454_2.png) [@BlunT76](https://phaser.discourse.group/u/BlunT76)\
**Post date:** [April 10, 2020, 12:31pm UTC](https://phaser.discourse.group/t/problem-with-player-rotation-by-mouse/5867/2 "2020-04-10T12:31:38Z")

</div>

Hi,  
From the doc at:  
[https://photonstorm.github.io/phaser3-docs/Phaser.Input.Pointer.html#worldX\_\_anchor](https://photonstorm.github.io/phaser3-docs/Phaser.Input.Pointer.html#worldX__anchor)

> worldX :number  
> The x position of this Pointer, translated into the coordinate space of the most recent Camera it interacted with.  
> If you wish to use this value outside of an input event handler then you should update it first by calling the Pointer.updateWorldPoint method.

Try to update the pointer in the update function with (not tested):

```javascript
update(time, delta) {
  this.input.mousePointer.updateWorldPoint()
  ...

```

---

_[View the full topic](https://phaser.discourse.group/t/problem-with-player-rotation-by-mouse/5867)._
