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
1answer
14 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
63 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
16 views

How to use WorldToScreenPoint-function in a texture context?

I am writing a simulation environment for robotics and tasks I have are sometimes are quite peculiar. I am rendering a scene into a RenderTexture and I have a set of 3D points. I want these points to ...
0
votes
1answer
28 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
22 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
15 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
76 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
46 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
18 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 ...
1
vote
1answer
30 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
9 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
39 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
55 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 ...
1
vote
0answers
61 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
34 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 ...
0
votes
0answers
35 views

How do I calculate orientation of GameObject in a custom coordinate system?

I am trying to build a custom coordinate system. To be more specific, the user chooses three points on screen to define the coordinate system. The first one is the origin, the second one is used for ...
0
votes
0answers
22 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
37 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
51 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
119 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
47 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
835 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
72 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
127 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
438 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
174 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
45 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
196 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
214 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
63 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
327 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
520 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
77 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
429 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
770 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
147 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
55 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
268 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
271 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
83 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
52 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
186 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
454 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
100 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
185 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
329 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
1k 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
41 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
597 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
2 3 4 5
7