# localToGlobal/globalToLocal: ARGH!

**URL:** <https://forum.kirupa.com/t/localtoglobal-globaltolocal-argh/164075>\
**Category:** flash\
**Created:** [September 28, 2005, 11:46am UTC](https://forum.kirupa.com/t/localtoglobal-globaltolocal-argh/164075 "2005-09-28T11:46:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ferdi](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/ferdi/32/689_2.png) [@Ferdi](https://forum.kirupa.com/u/Ferdi)\
**Post date:** [September 28, 2005, 11:46am UTC](https://forum.kirupa.com/t/localtoglobal-globaltolocal-argh/164075/1 "2005-09-28T11:46:26Z")

</div>

Hey guys!  
Again, I get stuck with localToGlobal. This is where my projects always fail!!  
I’m trying to figure out how to check if I’m hitting the lightmap or not, but somehow my coordinates are really getting messed up!

```php
var point = new Object();
		point.x = Game.Background.Lightmap._x;
		point.y = Game.Background.Lightmap._y;
		this.globalToLocal(point);
		
		if (this.hitTest(point.x,point.y, false)) {
			 trace("hit!");
		}

```

Can anybody tell me what I’m doing wrong here? 😟
