New answers tagged

2

Amit Patel wrote a great entry all about hexagonal coordinate systems at http://www.redblobgames.com/grids/hexagons/ and I strongly encourage you to read through the whole thing for a deeper understanding. A system he mentions in there that happens to be my personal choice for such systems is the Cube Coordinate system; In this system, three numbers are ...


2

This is classic rotation of a vector. You have your offset vector (-37, 192) which you need to rotate. xoffset = -37; yoffset = 192; rotatedxoffset = xoffset * cos(angle) - yoffset * sin(angle); rotatedyoffset = xoffset * sin(angle) + yoffset * cos(angle); x = Owner.x + rotatedxoffset; y = Owner.y + rotatedyoffset; If you are interested in learning why ...


0

You need to project from the worldspace to screen space using the correct camera, not the project method on the Vector2. Then unproject back into the camera of the Stage (but in your case that is set to the screen so it should just work). I think you want something like this; public void addScorePopup (int score, Vector2 worldPos, Camera gameCamera) { ...



Top 50 recent answers are included