Skip to content

tileToPoint gives incorrect data #458

@Krisseck

Description

@Krisseck

This is related to this forum post: http://www.isogenicengine.com/forum/viewtopic.php?f=5&t=179

I experienced the same bug in my code. pointToTile is fine, but tileToPoint gives slightly incorrect data.

I managed to simply fix it by overwriting the function as such:

tileToPoint: function (x, y) {
		var point;

		point = new IgePoint3d(x,y,0).thisMultiply(this._tileWidth, this._tileHeight, 1);

		return point;
		
	},

And this gives the correct data.

Lastly I would like to say that I am just a beginner with this stuff, so I have no idea if this function is correct or now, but for me, it seems to output correct data every time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions