So my issue is im trying to make a hexagon grid snap in game.. so ive searched and found one which works on a flat orientated hexagon... the problem is mine is pointy orientated hexagon(the point of the hexagon is at the top). so i tried googling it and tried finding formulas but i dont understand them so please can someone tell me what my formula should be..

so the size of my hexagons are 60,70

and the code i have found for the FLAT orientation is;

On drag drop

- set x to round(4*(Touch.X - 320)/(3*self.Width))

- set y to round((Touch.Y - 280) / self.Height - self.X / 2))

- set position to (self.Width*self.X *3/4 +320 , self.Height*(self.Y+self.X/2) + 280)

I dont understand this at all so can someone whos good a math please tell me what my formula would be for a pointy orientated 60,70 hexagon?

Thank you.