Questions tagged [coordinates]

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.

Filter by
Sorted by
Tagged with
0
votes
0answers
10 views

Map an equirectangular square slice inside cubemap

I'm trying to map a square slice of an equirectangular image inside a cubemap with 6 faces, without distortion. The point is that I'm dealing with huge array sizes if I try to project the whole ...
1
vote
1answer
32 views

Taking cube from camera space to clip space, error in my math?

watching Ken Joy's Computer Graphics lectures on youtube. One thing I'm confused about is after he gets the cube from the camera space to clip space, from my calculations the cube doesn't look like ...
0
votes
1answer
22 views

Libgdx: converting between two camera coordinates

I had a similar issue to the question here: Why is my text is too large even when scaled to .05f in libGDX? So I created a second camera for my text elements. I'm rendering the text above some other ...
0
votes
1answer
34 views

How to create a custom set of coordinates based on two points in Unity?

As the title says, I am having problems finding a way to create a new set of local coordinates based on two points. Here is an example: Consider that the two gameObjects are not one parent of another,...
1
vote
1answer
41 views

Find the co-ordinates of collided objects in Python

I have a group containing my aliens and another containing the bullets I have fired. When I detect their collisions, I want to pull the alien's x-y co-ordinates during it's deletion so I can put an ...
0
votes
1answer
188 views

How does a minecraft biome finder generates map

How does chunkbase biome finder generates map base on seed? I was curious if chunkbase knows the secret formula for generating the map? Or it uses other math formulas such as scaling, mapping etc... ...
0
votes
0answers
47 views

Approach to storing multi-cell-objects on a sparse Grid (Example: Buildings in Anno)

I am currently working on a citybuilding game and planing on how to store buildings on the map. In previous projects I used either a grid where each Object was exactly 1 cell; or Unity Objects ...
0
votes
1answer
57 views

Get Cartesian coordinates from isometric coordinates

Coordenadas: X:140 Y:279 Coor Isometricas:128/69 X: 2 Y: 1. CoordenadasConversas: 69:214. CoordenadasConversas should be equal to Coordenadas. ...
1
vote
1answer
59 views

How can I build an array of coordinates of a truncated icosahedron's faces?

I can easily get a list of coordinates of all the vertices—the Wikipedia page has formulae and this page has a list of them, but that doesn't tell me which ones are part of which face. What I'd like ...
1
vote
0answers
270 views

Unity Co-ordinate system to latitude longitude conversion floating point precision lost

I am using a Github script (Unity GPS Convertor) to convert unity co-ordinate system x,z into latitude and longitude. It is actually working fine but the problem is, when I go farther from the origin (...
0
votes
2answers
67 views

How can I set decimal values to a Pygame rect position?

I'm trying to make the gravity a bit slower, like ...
0
votes
0answers
42 views

How can I get rid off the imprecision of the model matrix when I using WGS84 as the coordinate system to render the earth?

The global coordinate of WGS84 is too big, a float is not accurate enough. The only two ways I can come up with are using dmat replace for mat or transferring the modelview matrix rather than the ...
1
vote
1answer
56 views

How can I convert screen coordinates from a click to 2D scaled world coordinates?

I need a way to convert screen coordinates obtained from mouse clicks to world coordinates in my 2D game. To create a zoom effect controlled by the user, before drawing a model I will scale all of it'...
2
votes
1answer
112 views

How to invert a Tilemap's coordinate system?

The Tilemap object in Unity uses a coordinate system that grows up-right from (0,0). (ie. with the Origin at the bottom-left of the screen.) I'm trying to represent a mapping system that has the ...
1
vote
1answer
36 views

Spine + MonoGame > viewMatrix / camera offset

we switched from frame by frame animations to Spine (this animation software). The issue I am facing now, that it am unable to fit it in our coordinate system. (simple 2D game) I guess there is an ...
0
votes
1answer
146 views

Handedness of 2D coordinate systems

I know that there's always a big debate on the handedness of 3D coordinate systems, but I can't seem to find any information about the handedness of 2D coordinate systems. Usually, the X axis points ...
0
votes
0answers
10 views

Calculating offset for translation between layer and world

When translating offsets between two coordinate systems, I'm using xOffset = Math.Abs(System2.StartPosition.X) - Math.Abs(System1.StartPosition.X) yOffset = Math.Abs(System2.StartPosition.X) - Math....
0
votes
1answer
243 views

Alternatives to Camera.main.ScreenToWorldPoint in Unity

What are alternatives to Camera.main.ScreenToWorldPoint in Unity? So, here is my code (just the piece which is relevant for the question): ...
0
votes
0answers
27 views

Swapping Axis by Swapping Matrix Rows

I'm using MathGeoLib, which uses row-major storage. The problem that I'm facing is that I'm going from a East-North-Up(ENU) coordinate system. And I need to go to an East-Up-North(EUN) coordinate ...
0
votes
1answer
48 views

Unity: How do I get the coordinates of the vertices of a blender mesh?

I have gameobjects in my scene called icospheres that I have made in Blender, and I am trying to get the coordinates of their vertices. Below is an image of my scene; each triangle is a separate ...
0
votes
0answers
35 views

Center of World Map not the same as the center of my Bullet Physics World

As you could see in the image, the center of my map should be located at the intersection of the diagonal lines. When I import 3D buildings within the area into my Bullet physics world, I want to set ...
0
votes
1answer
244 views

How to convert coordinates between world coordinates and screen coordinates

I am using a tilemap in which I have square tiles. Knowing that, the size of the screen and the player position(in world coordinates) how I convert between this systems? Is there any formula? EDIT: ...
1
vote
1answer
438 views

Convert global 3d coordinate system to a local one with specific direction

Imagine a (x,y,z) coordinate system within a solar system, with (0,0,0) beeing the center of sun where Z axis goes thru both solar poles. I'm standing on a planet inside a house within that solar ...
0
votes
1answer
91 views

2D converting absolute top-down coordinates into relative third-person coordinates

I'm working on 2D top down zombie game. I started working on it as having a static 2D map and on every tick you update the coordinates of every object, including the player itself relative to the ...
0
votes
2answers
51 views

How to geographically locate the position of character on a map?

Beyond the different coordinates systems (x/y, ...), imagine you draw the map of your world on a bitmap, png, gif or whatever image. Then you got your world and you'd like your players/character (PC) ...
1
vote
2answers
160 views

How to access coordinates of objects in bullet physics (libGDX)?

I need to access the x, y and z coordinates of a bullet physics object. I'm assuming this is done via the transform matrix, but I have no idea which values mean what. There doesn't seem to be any ...
0
votes
0answers
203 views

Unity WorldToViewportPoint not giving correct results

I have a script that places an UI element on the place where a 3d object is in 3d space. I do this in the following way: ...
0
votes
1answer
76 views

Can I position a player avatar behind the camera based on rotation?

I'm currently reverse engineering a video game where what's rendered on the screen depends on the proximity of the player avatar to the camera. As such, for my freecam to work properly, I need to ...
0
votes
1answer
49 views

Are constantly growing (in dimensional size) GameObjects a problem?

It's possible the following is fundamental to Unity, and not a problem? I am using an example of a WheelJoint2D/Car from the Ray Wenderlich tutorials. Note from the pic below, the top level game ...
1
vote
1answer
140 views

Convert Canvas Space point to local space of a rotated rect?

I got a quite tricky problem: I have my mouse position and my rectangle position in canvas space(screen space but with adjusted scaling). Now I want my mouse position converted to local space of the ...
0
votes
1answer
339 views

How to know if mouse coordinates is delta or absolute on Window and Android in Unity?

I wrote sample application, that allows to "rotate" object by mouse. Rotation occured by rotating of camera object around central object and the code is following: ...
0
votes
1answer
90 views

What am I missing for this flycam to work correctly?

Through reverse engineering, I've found an instruction to inject on which allows me to obtain the XYZ coordinates of the camera, as well as pitch and yaw. Thus, I have the following: camX (Plane)...
0
votes
2answers
138 views

Converting between world coordinate systems

I have a mesh (verticies, indicies, normals).This mesh uses following world coordinate system: Forward: x Up: z Right: y I am trying to convert it to a different coordinate system: Forward: z Up: y ...
0
votes
2answers
218 views

Getting position of a coordinate on the surface of a sphere

So I want to create a object B close to another object A, but I'm trying to avoid that A covers B: I have thinking how to achieve that. Take a look of the following drawing: I have been thinking in ...
3
votes
1answer
932 views

How can I move a vehicle using speed and steering angle?

I want to drive a vehicle in x and y coordinate area with range from (0,0) to (6000,5000). I am using Visual Components (using Python API). On input I have speed data and steering angle of wheels ...
3
votes
0answers
31 views

Defining a coordinate system for player residing in another coordinate system

I'm making a game and I wanted to simplify some code by taking advantage of linear algebra. I'm a little stuck. Let's say the player (green triangle) resides in a coordinate system where the x-axis ...
0
votes
1answer
39 views

Calculate the amout that should be added or subtracted to x and y axis with rotation?

Say I have this figure: How would I calculate the amount I must add or subtract to x and y axis to get the cube to move in the direction its facing? The rotation is a float 0 - 360 and 0 is straight ...
2
votes
1answer
437 views

Finding all hexagonal grid coordinates inside cover arc

I got a turret that points at the corner of hexagon (point A). It can shoot in cover arc that's shown here: I need to check if my target lies within this cover arc. From this tutorial: Hexagonal ...
1
vote
0answers
135 views

How can I adjust the origin for 2D UI in OpenGL?

As I am quite used to screen geometry, where 0,0 is at the top left corner or the screen (as it is for just about every desktop app and Web app in the world), but I find it very hard to actually ...
1
vote
1answer
162 views

Calculate movement in 2d

In 2d, I have a ship that I want to have move to specific coordinates. I've used Sidar's answer in How do I calculate how an object will move from one point to another? to get something that works ...
1
vote
0answers
231 views

Convert a quaternion from one coordinate system to another, which are not orthogonal to each other

I found a similar question like this in the following link: https://stackoverflow.com/questions/18818102/convert-quaternion-representing-rotation-from-one-coordinate-system-to-another/18818267 In ...
0
votes
1answer
98 views

Coordinate system not working properly! OpenGL

I am learning opengl and tried to add texture to a rectangle using ...
1
vote
0answers
338 views

Is there a way to get mouse coordinates relative to an sfml window without locking the mouse to the window border or monitor edges?

As the title states, is there a way to get the relative mouse coordinates to the sf::RenderWindow without locking the mouse cursor inside of the window border or monitor edges? In glfw using a mouse ...
2
votes
1answer
212 views

How to remap world space to screen space?

I am noob to game development, and while using a simple graphics library in Python to make a 2D game, I noticed that the coordinate system of the library had its upper left corner as (0,0), whereas ...
1
vote
1answer
521 views

Calculating the latitude & longitude of a raycast hit point on a sphere

I am working on a game where you look at a sphere and get the latitude and longitude of the position. I get the position on the globe with a raycast along the direction the user is looking. Using ...
0
votes
1answer
372 views

Lat, Lon and elevation Conversation into unity coordinates

I have came across a very vague project problem and its feasibility report or communication procedures I have to define. And here is the current scenario: I have two applications One is built on ...
1
vote
1answer
311 views

Update and merge Unity coordinate systems multiplayer - Hololens

Project Summary Creating a multiplayer HoloLens app that allows players to spawn and move objects around the local space they share. Problem I am able to connect to the other HoloLens and see the ...
0
votes
1answer
92 views

Field of view or resolution?

I'm new to CG and I'm building a ray tracer. I don't quite understand how to set camera parameters and film(pixel plane) parameters. Say I want to get an image of 400x300 resolution. I can set an ...
0
votes
2answers
220 views

OpenGL NDC initial values

I have a set of vertex locations to create a plane: ...
0
votes
1answer
448 views

Position Text Mesh above parent transform in world space

I'm making an isometric-ish 2d game in Unity. I want to display text above a sprite during certain conditions. For this, I'm using a TextMesh instantiated as a child of the sprite. In local space, ...