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.
2
votes
1answer
59 views
Colision detection of disc (Maximum Material Condition aka “Flatness”)
I have a 3D-laser scanner which gives me a series of points of a real-world object. The points are related by a common origin.
I know I can derive the equation of a plane from 3 points and that the ...
16
votes
4answers
3k views
Why is the origin in computer graphics coordinates at the top left?
From what I've seen almost all things use coordinates where (0, 0) is at the top left and the positive Y-axis goes in the downwards direction of your screen.
Why is it like this? Why not the ...
0
votes
1answer
29 views
Mouse coordinate conversion Libgdx
I have a camera:
//Map is a my object that wrapper of TiledMap class
In the create method:
this.renderer=new OrthogonalTiledMapRenderer(this.map.getMap();
this.camera=new OrthographicCamera();
...
2
votes
1answer
75 views
Screen coordinates to isometric coordinates?
I know this has been discussed here before, but I couldn't find an easy solution for my particular problem. I have a tile system and I'd like to convert screen coordinates into isometric tile ...
0
votes
1answer
51 views
Coordinates issue vertical scroll Libgdx
I'm going crazy with this problem. I'll explain:
I have a camera that falls down (flowing along the y-axis) which displays a TiledMap and declare the whole in this way:
In the create method:
...
1
vote
1answer
97 views
Libgdx 2D Game, Random generated World of random size, how to get mouse coordinates?
I'm a noob and English is not my mothertongue, so please bear with me!
I'm generating a map for a Sidescroller out of a 2D-array. That is, the array holds different values and I create blocks based ...
7
votes
3answers
560 views
How do I translate a spherical coordinate to a Cartesian one?
Could someone point me in the right direction as to how this might be achieved? 3D math / geometry often throws me.
I'm looking for something like this (ideally in C#):
public Vector3 ...
1
vote
0answers
58 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 ...
6
votes
4answers
502 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
116 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
149 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
74 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
143 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
92 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?
0
votes
1answer
148 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, ...
1
vote
0answers
64 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
672 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 ...
0
votes
1answer
273 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
121 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
137 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
117 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
2answers
251 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( + ...
0
votes
1answer
36 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 + ...
0
votes
1answer
180 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 ...
1
vote
1answer
174 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
152 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
3k 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
136 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
86 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
19 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
88 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
79 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
152 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
926 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 ...
0
votes
1answer
263 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 ...
1
vote
0answers
351 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
83 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
149 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
126 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 ...
0
votes
0answers
136 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
453 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
69 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
2answers
234 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, ...
1
vote
0answers
90 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 ...
2
votes
2answers
149 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 ...
2
votes
1answer
159 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 ...
4
votes
1answer
377 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
70 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
97 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 ...