Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tileToPoint gives incorrect data #458

Open
Krisseck opened this issue Mar 5, 2017 · 1 comment
Open

tileToPoint gives incorrect data #458

Krisseck opened this issue Mar 5, 2017 · 1 comment

Comments

@Krisseck
Copy link

Krisseck commented Mar 5, 2017

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.

@Irrelon
Copy link
Owner

Irrelon commented Dec 15, 2017

Hey ya,

I remember this being an issue sometimes. I think it depends on if the parent entity or child entity is set to isometric or not. There are some complex issues around tiling depending on what mode the rendering is in (2d, isometric or 3d). That said, it is totally ok to overwrite a function if it works for you. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants