moving sprite on a hex grid

I have drawn a hex grid and a sprite. What I want to do is move the sprite from hex to hex I have googled this problem but have found no answers.

void drawHex()
{ const float hexagon_r = 10.0; const float hexagon_dx = hexagon_r * cos(30.0*PI / 180.0); const float hexagon_dy = hexagon_r * sin(30.0*PI / 180.0); const float hexagon_gx = 2.0*hexagon_dx; const float hexagon_gy = 2.0*hexagon_dx*sin(60.0*PI / 180.0); float x = 1.0f, y = 1.0f, z = 0.0f; int ni = 22, n

Published by CelleSports

CelleSports is a Game development, News outlet, and Social Cell community. Build your cells or teams for any game and start communicating efficiently. Join us in building the number one eSport and gaming community in the World. Join Cell eSports

Leave a comment