Wow, thanks for the input. I know using 3d can make life a bit easier in some aspects but will definitely make life harder in others. I spent over a year using Blitz3d and made a pretty cool (to me anyways :)) which I greatly enjoyed and had a lot of fun using, but I am looking for something more in the 2d area as far as look and feel.
Dishmoth, what you provide was plugged in to my code and worked flawlessly. It will take me a bit to figure out what the formula is actually doing, If I can figure it out, lol, but it works! I found close versions of the math you provided on the net, but I think there were just a few differences, like the 0,0 origin, maybe. If I was giving out an award, you would definitely be the winner for the first out of tons and tons of web pages giving formulas, theories and ideas in every language, to provide a pluggable code.
As far as I understood, Demonpants code was providing a point (mouse click), unrotating it and unscaling it. It matched what I was trying to achieve, but I easily got lost in the code and goal.
I did work out my brute force, unorthodox version last night which I would show, but I think alot of people would point at me and laugh. It took me 118 lines of code to get the same results, not using a formula.
I created a cell array which stores the origin x and origin y (top of each tile diamond) and the minimum, maximum x and y pixel values of each tile cell. When user clicks a tile, it would iterate through each cell and check …
if mouseX was larger than the minimum x and smaller then maximum x
if mouse Y was larger than the minimum y and smaller then the maximum y
This function would sometimes find 1 cell, sometimes 2 cells,
in the case of finding 2 cells, it would iterate through the cells coordinates to find the matching coordinates.
It did return the correct row and column even though it was a very inefficient way of doing it and I’m sure would prove to be way to slow when actually running a game.
I really, really appreciate all the help and time people have put in on this and Demonpants I will still be eagerly awaiting the tutorial
entry.
;D