When 2D camera moves, nothing out of the origin is rendered.



  • I'm making a 2D point n' click game, and currently working on the engine (that's why the map is plain right now). I'm using tiled maps, because they're easy to use and I can easily make all the hitboxes for things to click and stuff using object layers. Anyway, I took the Tiled map code from the Tiled example and modified it a bit, and the map renders fine, but only the corner of it. If I try moving the camera in any way, I just get black screen (of course if I only move it a few pixels, I can still see the rendered part of the map, but nothing past it). Here's what it looks like after moving the camera (with only the very corner of the map visible) 0_1564347824001_307e2022-9bc9-45d5-80d7-8208bec7e33f-image.png. and here's what the map looks like: 0_1564347850867_f98a3508-5834-46b5-a77e-ab1c9fc83f8c-image.png .
    If anyone needs any code snippets, I can give them. I feel like I'm probably leaving out a really small detail, but can't find anything that I left out, so I asked here.



  • resolved! was using camera.x instead of camera.scroll.x, a small mistake. just leaving this here incase anyone else needs it.


Log in to reply
 

Looks like your connection to HaxeFlixel was lost, please wait while we try to reconnect.