Numeric representation of the location of an entity in the game space. There are multiple forms of coordinate systems to cater to a variety of methods to map position.

learn more… | top users | synonyms

0
votes
1answer
125 views

On Screen Coin Animation

am working with side scrolling skater game. I want to perform coin animation such that as player collect coin it moves upside and attach with currency sprite. My main character and coin present in ...
1
vote
0answers
17 views

Why AnchorPoint doesn't affect `CCLayer` Positioning?

I think there is a different between CCLayer and CCNode behavior when I change their AnchorPoint. I will describe what I mean and please somebody explain it ? Scenario: I start with CCNode CCNode ...
5
votes
4answers
462 views

How do I convert from the global coordinate space to a local space?

Given an entity named EntityA, I want to define a local coordinate space, where the position of EntityA is the origin, its heading vector is the X axis, and the normal of the heading vector is the Y ...
0
votes
1answer
53 views

Convert Screen coords to World Coords LIBGDX

I'm working on a tile based platformer game in libgdx. I'm having trouble getting the actual touch input coordinates when the aspect ratio of device is different from the virtual fixed aspect ratio ...
2
votes
2answers
143 views

How do I convert screen coordinates to between -1 and 1?

I'm writing a function that allows me to click on my tiles. The origin for my tiles is the center, however, the mouse's origin is the top left. I need a way to transform my mouse coordinates into my ...
2
votes
1answer
60 views

Why are my 2D world click-positions offset after camera movement?

I'm writing a 2D game engine. I need to add a camera to my world that can zoom in and out as well as move away from its initial position at (0,0) at the center of the world. The main issue can be ...
1
vote
1answer
106 views

How to project spherical coordinates to canvas

I have objects with coordinates in a spherical coordinate system (altitude alt and azmiuth az). I want to project those to my canvas with a given size (128 x 128 pixels²) and resolution (about 6 ...
3
votes
2answers
88 views

How can I read the color of a specific pixel in XNA?

I want a way to find out if, for example, the pixel at Vector2(2, 5) on the game window is color Color.Red, or some other color or set of coordinates. How can I do this?
3
votes
3answers
3k views

Java Slick2d - How to translate mouse coordinates to world coordinates

I am translating in my main class render. How do I get the mouse position where my mouse actually is after I scroll the screen public void render(GameContainer gc, Graphics g) throws SlickException ...
2
votes
3answers
725 views

XNA texture stretching at extreme coordinates

I was toying around with infinitely scrolling 2D textures using the XNA framework and came across a rather strange observation. Using the basic draw code: spriteBatch.Begin(SpriteSortMode.Deferred, ...
0
votes
1answer
115 views

Could you explain this calculation of tiling and offset?

I don't understand why we add +colNumber when we calculate the offset = Vector2 ((uIndex+colNumber) * size.x, which gives us x=3 for the index 13, which is the square located at the coordinates x:1, ...
0
votes
2answers
203 views

Texture coordinates for a 3D box

I have a box model in my DirectX application, stored as 8 vertices: MyVertex vertices[] = { { DirectX::XMFLOAT3( - 1.0f, + 1.0f, - 1.0f ), /*,tex coord...*/}, //0 { DirectX::XMFLOAT3( + ...
1
vote
0answers
59 views

Storing rigid body collision shapes in local or world coordinates

I'm writing the beginnings of a lightweight 2d rigid body engine (in javascript, as a hobby project), and i'm debating whether to store collision shapes in local or in (updated as needed) world ...
1
vote
1answer
314 views

How to match user click and the sprite object position in libGDX framework

I am using libGDX Java framework for developing a practice game in Eclipse. My game is in landscape mode and I am using sprite image for game assets. Actually I am trying to follow the Kilobolt ...
2
votes
3answers
850 views

Isometric to screen, screen to isometric for irregular projection

I have isometric assets that unfortunately can't change and need to work out the projection for those. Here is how a tile looks like: The tile image width/height ratio is 0.(6) (height/widht = ...
0
votes
1answer
182 views

What are the advantages/disadvantages of using a polar coordinate system in a video game? [closed]

Would it ever be a good idea to represent an object's position as a magnitude at some angle relative to a reference point, instead of the typical x, y, z coordinates? What sort of effect would it ...
0
votes
1answer
112 views

Mismatch cordinate system of unity and android

I am new to unity3d, Right now i am adding a cube as game object with coordinate 0,0,0 But when i run it on android device Iam facing 2 problem a) Coordinate system of unity3d are different from ...
1
vote
1answer
110 views

How do I flip upside down fonts in FTGL [closed]

I just use FTGL to use it in my app. I want to use the version FTBufferFont to render font but it renders in the wrong way. The font(texture?buffer?) is flipped in the wrong axis. I want to use ...
0
votes
0answers
21 views

How do I scale and rotate around different points in Libgdx? [duplicate]

I'm using a SpriteBatcher to rotate and scale a TextureRegion in libGDX. I'd like to rotate the texture around an origin outside of the region, but have the texture scaled around the region's center. ...
3
votes
1answer
105 views

Float-based screen coordinates, higher mouse precision

I wrote 2 weeks ago about problem with motion blur in my engine. When camera moves using keyboard, motion blur is smooth. But when I rotate camera using mouse motion blur is stepping (not sure if I ...
0
votes
1answer
213 views

Importing an object from Blender into a scene, rotation on X axis?

This is my situation: I save the scene with blender no export with any processing steps. Blender has x right y up -z into the scene for the view coordinates (OpenGL) I have x right y up -z into ...
0
votes
1answer
165 views

isometric coordinates issue: (0,0) and (5,5) are flipped?

I am having an issue with the isometric coordinates. When I enter the coordinates (5,5), the character should be at the bottom corner of the tile, but it is at the top corner, (5,5) and (0,0) look ...
0
votes
1answer
35 views

drawing line using angle

code below make enemy move towards player. //Calculate Distance formula double xDiff = player.x - enemy.x; double yDiff = player.y - enemy.y; double dist = Math.sqrt(xDiff * xDiff + ...
1
vote
1answer
172 views

What is the purpose of inertial space and what are its uses?

I'm currently reading about left-handed and right-handed coordinate systems when working with 3D and it's all very fascinating. These systems are made up of world space, object space, and inertial ...
2
votes
1answer
130 views

Is it bad-practice using left-handed coordinate system in OpenGL eye-space?

In the engine I am currently programming I want to use a left-handed coordinate system for eye-space instead of the glFrustum standard right-handed one. Is that in anyway considered bad practice?
0
votes
3answers
2k views

Spherical coordinate from cartesian coordinate

I am implementing a type for Ogre 3D rendering engine to provide spherical coordinates. So far everything is working fine, until I try to build spherical coordinates from a cartesian vector. Here is ...
2
votes
2answers
125 views

What's the rationale for different coordinates systems?

Could someone explain to me why Blender and other 3D modeling apps switch axes? If I export model with Blender, then exporters do following things for the same model: The 3DS format applies this ...
0
votes
1answer
83 views

How can I solve for the game's world coordinates?

I've used 3DReaperDX to get a obj file, the header information are shown as follows: #AR=2.00606, FOV=45.09583(height), Xscale:0.83290, Yscale:0.41519, Zscale:1.0 ...
0
votes
0answers
18 views

How to Point sprite's direction towards Mouse or an Object [duplicate]

I need some help with rotating sprites towards the mouse. I'm currently using the library allegro 5.XX. The rotation of the sprite works but it's constantly inaccurate. It's always a few angles off ...
0
votes
2answers
84 views

Need to know the origin and coordinates for 2d texture and 2d/3d vertices in webgl

Long story short, I know my coordinates are off and I believe my indices might be off. I'm trying to render a simple 2d rectangle with a texture in webgl here's the code I have for the vbo/ibo: ...
0
votes
1answer
77 views

How can I plot points and generate a list of coordinates?

I'm trying to make a game which involves drawing a map. I drew out such a map, with coordinates, in a pixel art program: Now I would like to get all the coordinate points of the black squares. I ...
0
votes
1answer
142 views

What does “Poser-like” mean?

The Wavefront OBJ exporter of 3DSMax says it can flip YZ axis. Claiming this is "Poser-like". What does this mean? And what is the exact transformation if we decide to flip? Is it simply this? x ...
19
votes
3answers
915 views

What's so different/complicated/useful about vectors?

Forgive me if this isn't considered a real question, but it is something I am genuinely confused about. I constantly hear other game developers talk about how using vectors are very useful, but also ...
1
vote
0answers
295 views

c++ opengl unproject not working

first of all, sorry for the bad english. I need to convert my mouse coordinates to world coordinates, I'm trying to use the glm unproject method. 1280x720 is the size of the window, It's hard coded ...
0
votes
0answers
78 views

How to encode float3 into float2 and back again in HLSL?

Good afternoon, I am looking to offload some 3D calculations to the GPU without raising my requirements to DX10. Specifically, I am generating densities in 64x64x64 3D blocks, which fit nicely into ...
1
vote
1answer
137 views

Cartesian Coordinates & Layout [duplicate]

The way cartesian coordinations are presented and used is kinda confusing. When working with 2D the vertical axis is Y, though when working with 3D the vertical axis is Z and Y becomes the "depth" ...
4
votes
1answer
120 views

Can you help me solve the paradox that has confused me about the glViewport and glOrtho functions?

suppose that I have an image that I want to apply as a texture on a geometry (at time we don't consider texture mapping but this image has a certain width and height here it is a 512x512 image) I want ...
1
vote
3answers
2k views

What is the Box2D coordinates system?

I know that for Box2d I need to translate pixels to meters which is easy peasy. However my problem is what is the orientation of Box2D coordinates system? Is this the same as screen one (right += x, ...
0
votes
0answers
124 views

How do I find the rotation point given a touch anchor, new position and new rotation?

I've got an Cocos2d layer which anchorPoint, position and rotation (according to http://www.qcmat.com/understanding-anchorpoint-in-cocos2d/) vary when the pinch zoom gestures. Everything works fine. ...
10
votes
2answers
452 views

World Bounds - (0, Size) or (-HalfSize, HalfSize)?

When creating a game space in which to move, draw and collide objects, is it better to have the (0,0) point, or the (0,0,0) point, be in the very center of your space, such that the bounds of the ...
0
votes
1answer
68 views

Get rotate angle using a formula

I am developing a game that is being played on a board with the top first tile having the coordinates [0,0], the next one has [0,1], second row has [1,0]... and so on (most likely this would be a ...
1
vote
0answers
82 views

Rotate view matrix based on touch coordinates

I'm working on an Android game where I need to rotate the camera around the origin based on the user dragging their finger. My view matrix has initial position of sitting on the negative z and facing ...
1
vote
2answers
216 views

What am I missing? (Converting 2D mouse coords to 3D space)

I'm making a networked game which has a birds-eye view and I'm trying to convert the 2D mouse coordinates into 3D space. Right now I have a perfectly flat grid and it intends to remain perfectly flat, ...
2
votes
1answer
155 views

Texturing spherical terrain, seemingly arbitrary distortion

I'm using this algorithm to find texture coordinates on a sphere: Wikipedia UV Coordinates I get the famous seam due to the wrong interpolation, but I also get odd distortions on certain points on ...
1
vote
1answer
274 views

What to do to UV coordinates, when swapping Z/Y coordinates (axis) of the geometry?

In my Maxscript exporter I have the ability to flip the Z/Y axis by simply swapping the Z and Y co-ordinates. When swapping the axis this way, what is the correct thing to do to the UV coordinates? ...
2
votes
2answers
144 views

Calculating specific coordinate along a path

Let's say I have a path comprised of a sequence of points that are connect by lines and arcs. The entire path has some specific length. Let's call that length 100. What would be the mechanism to ...
4
votes
1answer
328 views

2d coordinates vs x/y screen positioning

I have a 2d top-down view tile map game, that generates random color tiles (water colors) as you move the character. I've been positioning elements on screen using the x/y coords (finding a way to ...
0
votes
1answer
69 views

Getting correct direction of the Car [duplicate]

I am building a car racing game using the coordinate system in which I have enemies's cars and the player cars. I want to ask that what is the best way to find the the direction of enemies's cars so ...
0
votes
0answers
93 views

AI in Car game using Coordinate System

I am making car racing game. I built the game in coordinate system. I have a enemies's cars and the player car. I am stuck with the AI of the enemies's cars. I am searching for the ways in which I can ...
1
vote
2answers
424 views

Converting hexagon grid coordinate system

As I have been building on a RTS game based on hexagon grid built in javascript. I stumbled across a problem regarding the coordinate system. Have been trying to implement a A-star system to find ...