sfml-tmxloader icon indicating copy to clipboard operation
sfml-tmxloader copied to clipboard

Isometric causing weird issues

Open Steveo5 opened this issue 7 years ago • 5 comments

Hello, I have everything up and running properly and all works well. However I noticed that when moving the view around the map because its isometric and therefore at a different angle then things that are supposedly outside the view don't get drawn even though they are still visible. How could I fix this? Cheers!

Steveo5 avatar Oct 13 '16 02:10 Steveo5

Probably related to #59 - the first place to look would probably be how the layer patches are generated for isometric maps. The bounding boxes for these patches are used for culling (iirc).

fallahn avatar Oct 13 '16 12:10 fallahn

Oh cheers, edited some of the bounding boxes and now all works well!

Steveo5 avatar Oct 13 '16 21:10 Steveo5

Good to know! If it fixes a bug could you perhaps share what you did or submit a pull request?

fallahn avatar Oct 13 '16 21:10 fallahn

I just added a padding to the bounding box, for example in the MapLayer.cpp at line 94 I took off a padding of 1000 so that way the map should generate a little outside of the view port area. Possibly could check if the map is isometric first but mine is so I didn't bother.

Steveo5 avatar Oct 13 '16 22:10 Steveo5

It sounds like it could be as simple as correctly converting isometric coords into sfml/world coords. I'll investigate further when I can. Thanks for the feedback!

fallahn avatar Oct 14 '16 07:10 fallahn