Any way to get relative fixed position within current camera viewport while scrolling through level?

17 views
Skip to first unread message

Rich Walter

unread,
Jan 19, 2016, 2:10:53 PM1/19/16
to HaxeFlixel
Hi, I have a HUD setup that is non-scrolling at the top of the screen, and a tile based map scrolling under it (approx 8 screens wide total world size). What I am trying to figure out is how to make a collected FlxSprite "moveTowardsPoint()" at a destination location in the HUD, even when the screen is scrolling. Is this possible? I can't seem to find x,y values for this anywhere. Thanks.

Jeru Sanders

unread,
Jan 19, 2016, 4:54:13 PM1/19/16
to HaxeFlixel
Add the FlxPoint "FlxG.camera.scroll" from the object destination in local space.

Rich Walter

unread,
Jan 19, 2016, 4:57:04 PM1/19/16
to HaxeFlixel
That's it! Thanks!
Reply all
Reply to author
Forward
0 new messages