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
170 views

How to get a position from a radial distance and angles?

I have a radius and the 2 angles for northSouth and eastWest rotations in degrees. I need a Spherical position or a cartesian position (I have code translate one to the other) Where a position is ...
2
votes
1answer
764 views

Why AnchorPoint doesn't affect `CCLayer` Positioning?

I think there is a difference 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 *...
1
vote
0answers
23 views

Pixel Check With Node.js

I'm trying to check if a pixel of a certain color at (x,y) has moved within a boundary of [(x1,y1),(x2,y2)] and also update its new position to console. I'm doing this as a desktop application so no ...
3
votes
2answers
185 views

Isometric Tile Selection with rectangular bounding boxes

I am having problems trying to determine which tile I have selected with the mouse. Currently it selects two tiles, rather than one. Producing the following results: My tiles height, is half their ...
1
vote
1answer
60 views

Vertically mirroring the screen in LibGDX

I'm developing a game in which the screen layout is different for right and lefty players, so i'll put a button in it to mirror the screen vertically. For displaying textures and fonts, i use a ...
0
votes
2answers
319 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(); ...
1
vote
0answers
19 views

Rectangle in object-layer has wrong coordinates in game

I extended the SuperKoalio LibGDX Example about an Tiled Object Layer in the Tiled Level-Editor and draw a rectangle on this layer. Now I would like to draw this rectangle in my game using the ...
1
vote
0answers
94 views

Isometric map (2D) - Click detection - Mouse mapping - How to implement it? [duplicate]

I'm building an isometric engine. I use TILE_SIZE * TILE_SIZE (minecraft like) tiles. (I'm using 64 * 64 tiles but I can change the number when I want) I can access for each tiles to this ...
2
votes
1answer
54 views

How to change XNA coordinates directions?

Usually XNA increases X coordinate to right and Y to down. Like this: But in my project i have 2D map. Drawing tile with bigger Y coodinate below OX looking strange (usually people imagines these ...
0
votes
1answer
56 views

Project camera-to-pixel ray in world coordinates

I'm trying to implement a very simple ray tracing function but I have a problem with projecting the camera ray (from camera to pixel) to the world space. In the screen coordinates have the pixel ...
8
votes
2answers
301 views

BRDF and Spherical coordinate in ray tracing

I developed a ray tracer that use standard phong/blinn phong lighting model. Now I'm modifying it to support physically based rendering, so I'm implementing various BRDF models. At the moment I'm ...
1
vote
1answer
56 views

Virtual game dimensions - how to implement?

I'm creating a fighting game in LibGDX with a static board, camera moves only right<>left. There are 5 screen aspect ratios in Android and Apple so I have created 5 different background graphics: ...
1
vote
1answer
41 views

How can a player exist at a location that is not expressly defined?

How do video games like Minecraft know how to place characters on an infinitely complex plane? For example, the game knows the character's place up to 10 or more decimal places and can display them at ...
0
votes
0answers
15 views

Coordinate code for moving the object from one side to others side

I'm trying to make a 2D games, like airplane in android. To play the airplane, the user must shake the phone and then the airplane will move from left side to right side. And I don't know how to move ...
0
votes
1answer
30 views

Unity 2d square position not lining up with its size

I want to have one square that rests at the Unity 2d coordinates (5,5). Using transform.localScale I make the square be 3 units by 3 units large. So I thought that if I made another square that is the ...
0
votes
2answers
98 views

How to use the SDL viewport properly?

I'm very confused about the SDL2 viewport, I did some googling to find out how to implement it but people keep mentioning things like "world coordinates" which I don't have in my game. Question : Do ...
0
votes
1answer
54 views

Evaluate 2D point in a 3D triangle?

Given three points, (x1, y1, z1) (x2, y2, z2) (x3, y3, z3) and given a point "A" at (x, y), how would I find "A'", at (x, y, z)?
0
votes
1answer
24 views

How to find a point of taking into account the distortion of the projection

I can not find the material that will help me to implement the algorithm of coordinate transformation based on the distortion of the projection. I am creating a code recognition algorithm (similar ...
0
votes
1answer
33 views

Position of an object relative to another in a 2D plane

I have two objects, A and B, each of them has a set of coordinates (x,y). How do I understand where is A in relation to B's position? If I where to just check each coordinates I could do it like this:...
-2
votes
0answers
56 views

Motion related databasing with SVG and SQL [closed]

In my game I have two elements moving towards each other, meeting in the middle of the screen. Something like this: (the image will be two slowly converging mouth-like objects, but it's not finished ...
1
vote
0answers
44 views

Pixel Perfect Texture Sampling

Right now I am using the following two shaders to render a sprite from a texture used as a sprite atlas onto a canvas that has canvas_size pixels in screen coordinates. I use a static quad as input ...
0
votes
1answer
177 views

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

Is there a program that lets me draw, a la pixel art, a map, and give me a list of coordinates and their corresponding colors? For example, I'd like to use a point and click interface to draw this ...
1
vote
1answer
138 views

Using glm to rotate the modelview matrix based on the cursor position

I am rendering a 3D model of an object, and I want the user to be able to rotate around that object by dragging the mouse. To do this, I want to use the cursor position to continually update the ...
0
votes
0answers
46 views

glOrtho and VBO

I'm trying to send triangles to OpenGL using screen coordinates. Using the deprecated glBegin and glEnd I could just set up an orthographic projection and use screen-space coordinates as the triangles/...
1
vote
3answers
147 views

What does it actually mean by World, Window and Viewport?

I am studying Computer Graphics myself. I am stuck with the concept of World, Window and View-port. As far as I understood: (1) World - is an abstract and imaginary space that is imagined to exist ...
1
vote
1answer
95 views

Coordinate system for a strategy game

I am working on a personal project of developing a simple 3D strategy game. I am working on my own game engine (let's assume that I have to have my own) and I have one theoretical question. How to ...
1
vote
1answer
114 views

Anchoring a sprite to a specific x & y on another, regardless of rotation [Gamemaker]

I have a sprite, sDetritus, with a corresponding object, oDetritus, and an sTurret and oTurret. If I apply no rotation (i.e. changing the image_angle) to oDetritus, I can anchor the oTurret to a ...
0
votes
0answers
207 views

Converting Transformation Matrices from OpenCV to Unity

I am working on an AR project, which uses OpenCV and Unity 3D. OpenCV uses Right Handed Coordinate system (different from OpenGL, because OpenCV camera looks along positive Z axis), while Unity has ...
3
votes
1answer
123 views

LibGDX Overlay Game with Stage

I have been working on a 2d game that is similar to billiards/pool. I've got the basic game down and now I'm working on some visual effects. One of the things I would like to do is have have numbers ...
1
vote
2answers
73 views

How define coordinates for bodies in outer space

What is a simple way of representing celestial bodies in outer space using a coordinate system? There are actual scientific coordinate systems (see https://en.wikipedia.org/wiki/...
1
vote
1answer
92 views

Converting normalized device coordinates to world space coordinates flipping my sprites

I'm trying to convert my game's camera system to use world space coordinates rather than OpenGL's default normalized device coordinates, however in doing so my sprites are being rendered improperly as ...
7
votes
1answer
181 views

Get local coords from global coords

I need to get local coords from global coords. I did not find ready-made examples. Please help me how to do it on the example image. Thank you! UPDATED: Here's the method in the java, created ...
0
votes
1answer
1k views

Isometric screen to 3D world coordinates efficiently

Been having a difficult time transforming 2D screen coordinates to 3D isometric space. This is the situation where I am working in 3D but I have an orthographic camera. Then my camera is positioned at ...
1
vote
1answer
28 views

Is it necessary to use texture filtering if I use texture coordinate system?

I have one question about using texture filtering. It's clear when I used normalized texuture coordinates (in any API) for example from (0,0) to (1,1) it is necessary to use texture filtering because ...
6
votes
3answers
538 views

Overcoming float limitations for planet-sized worlds in Unity

As far as I know, going further than 1M units from the world origin in Unity is hardly possible due to floating point precision issues. Making a world more than 1M units in radius would require ...
1
vote
1answer
286 views

Finding relative x and y value on a sprite [Gamemaker]

I'm having a little conundrum that may just result from a lack of knowledge of Gamemaker's functionality. I've attached two images to aid explanation. I have a sprite of a turret (with a gun ...
1
vote
0answers
31 views

Explanation of the parameters in the line intersection code

I am trying to understand a C code that moves the mesh nodes for each time step and i am totally struck on the parameters t1 and t2 please help me sorting this out. So here is what the function gets (...
5
votes
3answers
786 views

Is a custom coordinate system possible in Unity

Is it possible to create a custom coordinate system (i.e the one using double for coordinates or the one dividing the world into 'chunks' of safe size) not constrained by the floating point precision ...
1
vote
0answers
99 views

Getting screen coordinates of actor

I'm trying to tell if an actor exists at a screen position so I can do something if the actor is clicked on. To do this, I first need to get the screen coordinates of the actor so I can compare it to ...
1
vote
1answer
154 views

Error in projecting coordinates from FitViewport to screen in LibGDX

i'm using a FitViewport to render my "game world". Viewport virtual dimensions are fixed 400x240. I use viewport.unproject method to scale input touches from screen coordinates to world coordinates, ...
0
votes
1answer
38 views

Box2d Coordinate System

In the game I'm trying to code I got to have two bodies. One StaticBody and one DynamicBody. I want to have the DynamicBody on top of the StaticBody. Somehow all I get is this: Is it possible that ...
7
votes
5answers
7k 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 ...
1
vote
0answers
22 views

Proper way to wrap sprite for Z dimension

I am using SFML, but I need to add some emulation of 3D by wrapping the sprite with a Z component. When sprites are drawed (or when objects moved?), their X and Y will change depending on Z. My ...
1
vote
1answer
72 views

Find x and y position with angles in 3D world

I'm actually creating a Tracking Camera (or 3rd person camera), and to do so, I used two angles (X and Y) for the rotation of the camera and an other floating value for the distance between the target ...
1
vote
0answers
168 views

Matrix transform from one coordinate system to another

I have been beating my head against the wall for weeks on this and it is time I just break down and ask for help. I need to move a 3D camera from an in house system into Unreal 4. The two use ...
5
votes
2answers
160 views

How can I represent location in a massive world?

I've been thinking about No Man's Sky a lot recently and all the technical challenges they must face. For example, how on earth do you store a players location in a world that is so enormous? I ...
1
vote
0answers
38 views

Can I “Pre-rotate” VBOs while loading them in LWJGL?

It is possible to flip VBOs horizontally and vertically by swapping around destination coordinates. Is it possible to rotate an image by any angle, such as 45 degrees, using different destination ...
2
votes
1answer
183 views

convert mouse coords to zig-zag isometric

I was wondering, how do I convert mouse coordinates to zig-zag isometric coordinates? I already know how to convert to isometric using the Diamond approach, so I just need to know about the zig-zag ...
1
vote
2answers
262 views

Easy method of obtaining texture coordinates for sprite sheet

In my (OpenGL ES 2.0 Android) game, I use 2 types of Sprite Sheets. In one type all sprites/frames are of equal size and in the other they are all different shapes and sizes. It is the latter one to ...
0
votes
2answers
261 views

2D Coordinate Based Game [duplicate]

I want to make a game for Android that has a 10x10 Grid Plane as UI.In this game users going to touch on a grid and tihs grid will be painted. My question is how do I understand which gird or tile ...