pointToTile fine, tileToPoint gives unexpected result

Post your help queries and engine programming questions here

pointToTile fine, tileToPoint gives unexpected result

Postby robaldred » Tue Feb 18, 2014 10:55 am

I've noticed an issue with the tileToPoint method on IgeTileMap2d whilst trying to work out how to resolve my issues with the path finder teleporting.
I've been able to replicate the issue on 9.5-goto-path-finder

So given that I have a tileMap with tiles 40x40
And I have a point = IgePoint3d(140,300,0)

Code: Select all
tileMap.pointToTile(point) => tilepoint = IgePoint3d(3,7,0) // as expect
tileMap.tileToPoint(tilepoint) => IgePoint3d(-260,-100,0) // what's going on here?
// surely this should be the opposite of pointToTile? I was expecting to get IgePoint3d(140,300,0)


I've tried various combinations of toIso, or to2d on the point but I can never arrived at the same value.

I think tileToPoint is returning a point based on the origin of the tilemap being the centre of the tileMap
I don't work for Irrelon. All comments are my own.
I would strongly encourage anyone building production projects with Isogenic to buy a premium licence, it costs very little and will help towards continued development of the engine. Irrelon have spent thousands of hours developing this wonderful platform with many features found in AAA game engine.
User avatar
robaldred
 
Posts: 243
Joined: Wed Oct 23, 2013 8:09 pm
Location: Manchester, England

Return to Help & Questions

Who is online

Users browsing this forum: No registered users and 1 guest
cron