# World position to screen position

**URL:** <https://phaser.discourse.group/t/world-position-to-screen-position/15352>\
**Category:** Phaser 3\
**Created:** [May 23, 2025, 5:59pm UTC](https://phaser.discourse.group/t/world-position-to-screen-position/15352 "2025-05-23T17:59:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fheuef](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/fheuef/32/8962_2.png) [@Fheuef](https://phaser.discourse.group/u/Fheuef)\
**Post date:** [May 23, 2025, 5:59pm UTC](https://phaser.discourse.group/t/world-position-to-screen-position/15352/1 "2025-05-23T17:59:37Z")

</div>

How can I convert a position vector in world space to camera space ?  
I imagine there must be some function for this, but I haven’t found anything.

To be clear, I know I can get the position of an object in world or screen space, however I’m just trying to convert positions without any existing object.

I also found the getWorldPoint(x,y) method on the camera, so why isn’t there a getCanvasPoint method to do the opposite ?

All I’ve found so far are a few examples that are either out of date, ignore camera rotation, or make use of the matrix attribute of the camera - which is private.

---

<div class="post-metadata">

**Author:** ![samme](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/samme/32/5275_2.png) [@samme](https://phaser.discourse.group/u/samme)\
**Post date:** [May 23, 2025, 6:48pm UTC](https://phaser.discourse.group/t/world-position-to-screen-position/15352/2 "2025-05-23T18:48:56Z")

</div>

👋

I don’t know a function for this either. I did it this way.

[https://codepen.io/samme/pen/eYvyZqQ](https://codepen.io/samme/pen/eYvyZqQ)
