Quick Links: Gideros Home | Download Gideros | Developer Guide
TileMap always returns 0 for getWidth() and getHeight() - Gideros Forum
TileMap always returns 0 for getWidth() and getHeight()
  • I've just started using TileMaps, and they render fine, but I want to collect events on them, and tilemap:hitTestPoint(x,y) always returns false. After a bit of digging, I discovered that tilemap:getWidth() and tilemap:getHeight() are always returning 0, so I guess this is affecting the bounds calculation for hitTestPoint().
  • ohh.. exactly as you said. thank you for reporting. now I'm updating the tilemap implementation.

  • Just as an aside how do you know about these methods?

    When i look at the reference docs there is no mention of hitTestPoint, getWidth and getHeight I must be missing something!

    Cheers

    Gary
  • ar2rsawseenar2rsawseen +1 -1 (+1 / -0 )
    You see, TileMap inherits from Sprite (in docs TileMap > Sprite), it means it has all Sprite methods

    Loves: Garyk1968

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Login with Facebook Sign In with Google Sign In with OpenID

In this Discussion

Top Posters