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

1
vote
1answer
66 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 ...
0
votes
0answers
25 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
48 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
56 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 ...
1
vote
1answer
45 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 ...
6
votes
1answer
238 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
23 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 ...
7
votes
1answer
164 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 ...
1
vote
0answers
25 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 ...
1
vote
1answer
35 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 ...
1
vote
1answer
62 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 ...
5
votes
3answers
236 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 ...
6
votes
3answers
236 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
0answers
42 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
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
58 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
68 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 ...
1
vote
0answers
34 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 ...
1
vote
1answer
92 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
2answers
158 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 ...
0
votes
0answers
29 views

Platformer Tile Map Collision Help

I've been working on a small platformer as a simple project but, I'm having troubles with my collision detection. What I want is that as the player falls due to gravity, it will stop when it touches ...
2
votes
1answer
83 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 ...
0
votes
1answer
32 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 ...
0
votes
0answers
18 views

How do I generated cubic UV coordinates for a mesh?

I'm trying to add a utility function to my game engine that generates cubic texture coordinates for a specified mesh. I've attempted to come up with my own algorithm but I can't get it to work ...
5
votes
2answers
111 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 ...
0
votes
1answer
592 views

Unity3D Get object size in order to be used in Vector3 coordinates

I have a plane in Unity in 3D project, and I want to get its boundaries so I can use them in random function for getting Vector3 coordinates. Currently I am trying like this GameObject ground; void ...
1
vote
1answer
80 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, ...
1
vote
2answers
101 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 ...
4
votes
1answer
692 views

How do I convert screen coordinates to isometric tile map coordinates in libGDX using matrices

I know this has been asked many times but my question doesn't quite fit the others. I have an IsometricTiledMap and I need to get the tile under a set of screen X and Y coordinates. Here is a picture ...
-1
votes
1answer
106 views

What is the best way to send/receive data about user coordinates and other properties?

For example If I have 2 users, and each of them have an object, and that object has: x coordinates, y coordinates, angle, state, and other properties... I use java let'say the game changes at 30 ...
1
vote
1answer
92 views

Coordinate System - Movement from A to B

I've got the following code snipped : var distanceFromDestinationSquared = ( Math.pow(this.orders.to.x - this.x, 2) + Math.pow(this.orders.to.y - this.y, 2)); ...
0
votes
0answers
18 views

Screen coordinates to letterboxed view

So I have letter boxing working properly (it's not really important but I'll post that bit of code too), but I'm trying to figure out the point/vector arithmetic for translating (projecting) screen ...
1
vote
1answer
136 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
2answers
193 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 ...
1
vote
1answer
98 views

How are CSS and WebGL coordinates related? [closed]

I'd like to build a simple framework which rendering combines web page DOM elements with WebGL, such that they're manipulable in the same coordinate space. How does the plain CSS coordinate system ...
0
votes
0answers
89 views

Coordinate system in OGLdev tutorials

Working with OGLdev tutorials http://ogldev.atspace.co.uk/ I found that this code uses coordinate system, which doesn't look like in most other samples. Positive x-axis direction is left, and not ...
0
votes
0answers
124 views

Pre- or post-multiplication for rotation between coordinate frames

I have three 3D coordinate frames: O, A and B, as shown below. I want to know the rotation matrix RAB between A and B, that is the rotation that is required, with respect to the frame A, to move ...
0
votes
0answers
35 views

Rotating between two coordinate frames

I have two coordinate frames, A and B. I want to create the rotation matrix RAB which takes you from A to B. A is a right-handed system, and B is a left-handed system. Furthermore, after moving from a ...
0
votes
0answers
141 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 ...
0
votes
0answers
74 views

Transformations between coordinate systems

In a graphics engine, I have three three-dimensional orthogonal coordinate systems, O, A and B. A and B are the result of two different transformations from O. I now want to calculate the ...
2
votes
2answers
320 views

How can I compute which chunk a coordinate is in?

I am working on a video game. Everything (terrain, entities, particles) is stored in 100 by 100 chunks. Here is the array structure for the chunks: public static final int chunkSize = 100; public ...
0
votes
0answers
70 views

Collision detection in JavaScript Canvas game - Issue with 'if' statements [duplicate]

I am currently developing a simple browser-based game and seem to be on the cusp of collision detection that doesn't just return the player to where they were before, but actually will slide them ...
1
vote
1answer
98 views

“aim at” in 3D space algorithm

I'd to calculate the cartesian rotate values of "aiming" one point at another in 3D space. For example, assuming rotation order of XYZ: Point A is at [0, 0, 0] Point B is at [2, 2, 0] If point A was ...
0
votes
1answer
150 views

Mouse position to grid position not working

I have a function which converts my mouse position to grid position in the game but it is not working properly... its slightly off. I have two functions - one which converts from grid to screen ...
2
votes
1answer
323 views

How to put the game object to the upper left corner of the screen in Unity and make it visible entirely on all screens of mobile devices

I have game object which displays health indicator in my 2d video game in Unity. This gameobject contains a lot of sprites and i put it into left/top corner of the screen. In my game editor it is ...
0
votes
1answer
182 views

Bounding Box not rotating based on draw rotation (Java)

In the process of developing a 2D game and am having some issues with translating coordinates on rotation. The object being rotated is a sword that is attached to the player. The player currently ...
1
vote
1answer
222 views

How do I convert from rectangular to spherical coordinates?

This seems like a fairly basic and common problem. Is there a builtin way to achieve it or do I have to write the algorithm on my own? If I do, how should it work?
0
votes
0answers
38 views

OpenGL: What's the best way to convert a screen coordinate to a world coordinate? [duplicate]

For example, suppose I'm building a first-person shooter and the player pulls the trigger. I want to convert the screen coordinate (x, y) into a world coordinate (x, y, z) to know what they've hit. ...
0
votes
1answer
559 views

How do I get the mouse coordinates relative to my whole scene with Monogame? [duplicate]

I am making a topdown isometric real time game using Monogame. I know how to get the mouse position for my camera view. How do I get the mouse coordinates relative to the entire scene? My game's ...
0
votes
1answer
74 views

How to change the position of a circle in pygame in three stages

I will try to explain it as well as I can excuse me if I'll fail. I have the following simple game situation: I know the coordinates of each point. So each of the green points try to hit the blue ...