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
1
vote
1answer
81 views

How do game engines enforce global, engine-specific coordinate systems?

In Unreal, the 3D coordinate system is defined as a right-handed, X-forward, Y-left, Z-up frame of reference; but, the default 3D coordinate system for, say, DirectX is a left-handed, X-right, Y-up, Z-...
0
votes
1answer
65 views

Calculate how many degrees a physical device is off centre (offset) given X, Y, Z

Let's say I have a physical device that I can rotate with my hands and receive X Y Z coordinates of that device. What I need to calculate is the offset - how far is the pendulum of gravity straight ...
0
votes
0answers
24 views

How to check if a particular vector is pointing at X-Y plane or Y-Z plane

As you can observe from the diagram, Vector A is pointing at the Y-Z plane and Vector B is pointing at X-Y plane. Is this possible to find? Am I missing some logic or concept? EDIT: Suppose, Vector B ...
0
votes
1answer
34 views

convert world to screen coordinates with camera position and camera angle

Heyho :) I'm trying to convert world coordinates to screen coordinates. I have available: fov, screen width, screen height, camera position, camera angle and obviously the position of the object in ...
1
vote
1answer
20 views

Unity Animation makes object spawn at x0 y0 z0

I was making an animation for a coin in my game in Unity, and when I was testing the full game, I saw that the coin is spawning at x0 ...
0
votes
0answers
81 views

How to draw a rectangle at x,y where x & y are in pixel?

Here is my code : ...
0
votes
0answers
33 views

What is the math to project a 3D object's center onto a 2D plane?

What I really need is the x,y of the object when it is outside of the screen: I'm actually coding a UI in Objective-C, not a game. In this different kind of UI you navigate a 3D space with objects. ...
0
votes
1answer
22 views

Convert Global Space 3D Location to Local object space?

I'm trying to find a formula that could convert my 3D global coordinates into local object space. Here are the inputs I have ...
0
votes
0answers
23 views

Gauss-Krüger system to Unity Coordinate Conversion

In my recent project, I am getting an object file via a request to REST API and found that the OBJs (object file) are in Gauss-Kruger System. I want to know that how exactly I place the model as I ...
0
votes
1answer
52 views

How to use X,Y, and Z instead of Pitch, Roll and Yaw

I'm learning Unreal engine, and I'm rather disappointed because it uses pitch roll and yaw instead of the standard x, y, and z that I'm used to. Is there any way to convert this easily, or is there a ...
0
votes
0answers
76 views

Shifting the world origin and scaling all points?

Imagine you have a simulation in very large coordinates, and to render it out you need to scale it down (say, solar system -> fitting inside a few thousand units). This is controlled by a float ...
1
vote
0answers
24 views

Formula to convert zoomed in game space co-ords to UI

I need to come up with a formula to convert variable zoomed-in game space co-ords to UI co-ords. The engine I'm using is not traditional so there's no inbuilt function (convertToUISpace etc). Now I ...
0
votes
1answer
56 views

Convert GPS coordinates into Unity world space?

I am developing an AR application where a number of historical buildings are spawned around the player depending on his position when a target / QR Code is recognized. I know the Lat/Lon of these ...
0
votes
1answer
105 views

Unity - Transforming horizontal distance between two spriteRenderers to set UnityEngine.UI.Button width to this distance

In my Unity scene, I have a couple of spriteRenderers and a UnityEngine.UI.Button called ...
1
vote
3answers
82 views

2D Finding an algorithm to check pizza toppings positions

Using unity 3D I am creating a 2D pizza game and I am stuck at finding an algorithm to solve this problem which is Detecting if the pizza is half and half taking into consideration that the user can ...
0
votes
1answer
31 views

LibGDX changing actors parents is resulting in unwanted (x,y) translation

I have a Rolodex of task item actors I want to drag to an agenda tablet. My drag and drop functionality is non-native, but came from modifying a book's implementation. The problem seems to be when I ...
2
votes
1answer
67 views

Diamond shaped map: converting tile number to coordinates and back

I have a diamond shaped map that is displayed as follows: ...
1
vote
1answer
37 views

How to use WorldToScreenPoint function in a texture context?

I am rendering a scene into a RenderTexture and I have a set of 3D points. I want to convert these points from 3D to texture coordinate frame. It worked, when I rendered into screen and used ...
0
votes
1answer
35 views

GameObject LookAt not aligning properly

I have a celestial sphere with a plane in the centre and spheres (stars) aligned around the centre with a fixed radius. In order to show the stars visible from a certain latitude and longitude from ...
0
votes
1answer
31 views

How to convert point coordinate when taking a snapshot?

Can anyone explain me please how to convert point from Screen-coordinate system to Texture 2D? The screen size say for example 700x500 and Texture2D must be of size 1024x768. I am getting points from ...
0
votes
0answers
101 views

How to properly resize canvas according to screen size? (Javascript)

So, as the question says I need to resize the canvas according to screen size. However the thing is that that's not it. I also need to have the mouse coordinates updated proportionally. Seems like I ...
0
votes
1answer
1k views

Unity: AddForce in transform.forward direction not working as expected

I am building a very simple car-driving game in Unity. I have a Player object, which looks like this: As you can see, I have a Rigidbody2d component attached to this object, as well as a script, ...
0
votes
1answer
67 views

Conversion between coordinate systems

I have a chunk system that I created for my tile-based game, however I am having problems translating the coordinate in tiles of the cursor to the coordinate in chunks. This is my code so far: ...
0
votes
0answers
26 views

Swapping Y and Z in quaternion [duplicate]

I am converting between coordinate systems where Z is the vertical axis in one, and Y in another. I have the rotation values represented as a quaternion. I see this related issue but it's switching ...
2
votes
1answer
50 views

Scaling a rotated child with parent-child transforms

In unity, if you parent something to another object, then give the child some rotation, and scale the parent, the scale applies to some arbitrary axis to the child, here's some pictures to demonstrate:...
0
votes
0answers
10 views

World coordinates on vertical grid game for different aspect ratios (Unity) [duplicate]

new to game development and unity so hopefully someone can help. I want to make a 2D portrait mobile game that will have a grid of constant size where units can move on in Unity. This should support ...
1
vote
2answers
78 views

Dividing coordinate into unit cube

I'm trying to write a Java class to generate Perlin Noise from a Cartesian coordinate. I'm trying to follow this tutorial but I am struggling to understand the theory. Specifically, how do you divide ...
1
vote
0answers
74 views

How to place the origin of an isometric map at the top, not the left

I have an isometric diamond-shaped map. Currently my map origin is to the far left, instead of the top. The green circle at the top-center of the map is where I want the origin point to be, however ...
3
votes
0answers
169 views

How to convert screen to world coordinates while using gluLookAt / gluPerspective or similar matrix transforms?

I am just starting an adventure in looking under the hood of graphics for a game project I've been working on for a while, and I could use some guidance. I am using Python/Kivy (though that is not ...
0
votes
0answers
59 views

Latitude and Longitude to Vector3 Not Aligning

I am trying to align a marker sphere to certain places on a bigger Earth sphere based on the inputted latitude and longitude. The following is my code for this conversion, this code is based on the ...
1
vote
1answer
42 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
118 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
283 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
60 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
1k 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
1answer
91 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
246 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
656 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
393 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
49 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
529 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
405 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
102 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
564 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
1answer
849 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
1answer
179 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 ...
1
vote
1answer
675 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
1k 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
194 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
62 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
2 3 4 5
7