Skip to main content

Questions tagged [geometry]

A branch of mathematics concerned with questions of shape, size, relative position of figures, and the properties of space.

Filter by
Sorted by
Tagged with
0 votes
2 answers
157 views

I was working on this idea of drawing a cone rotating on the y axis with a parametric equation, using a compute shader with a function like: ...
philB's user avatar
  • 333
0 votes
1 answer
69 views

The stated assertion that a point outside some intermediate Minimum Enclosing Sphere is on the boundary of the final Minimum Enclosing Sphere seems unsupportable. It is true only for the first point ...
WernerJuengst's user avatar
1 vote
1 answer
129 views

I'm trying to determine the transformation steps (position, scale, rotation) needed to be applied to an object so that two points, locally positioned in that object, line up with two world space ...
Zeppelin's user avatar
0 votes
0 answers
61 views

I have used Probuilder to "probuilderize" the interior of a building however when I do this faces get deleted all over the model. I know it is definitely Probuilder causing this as when I ...
FrontEnd's user avatar
  • 1,789
1 vote
1 answer
581 views

Let's say I have position A, that is (0,0) and Position B that is (10,5). Now let's say I know that position C is 5 units' distance from position A in direction to Position B. Provided that the ...
user57129's user avatar
  • 133
2 votes
1 answer
123 views

I'm a fairly new game developer, and I've been working on a custom mesh editing system. I've been able to implement edge bevelling (almost, stuck on a division by zero problem), Catmull-Clark ...
KING MOOSE's user avatar
0 votes
1 answer
137 views

I have a hexagon grid with cubic coordinates. I want to calculate clockwise all border hexagons for a given movement range. At the moment, I am iterating every neighbor that is not in the range and is ...
Jachuc's user avatar
  • 45
1 vote
1 answer
146 views

I'm trying to create an icosahedron (I've been trying to figure this out for about a week). Basically, I followed this article to create an Icosahedron mesh in code, and the positions of the vertices ...
Jax's user avatar
  • 474
1 vote
0 answers
274 views

I am trying to convert a transform from the Unity Coordinate System to the Unreal Engine Coordinate System (and others). Ideally, I want to take a position, rotation (in Euler angles), and a scale as ...
Benjamin Danger Johnson's user avatar
0 votes
2 answers
121 views

Godot 4.1 Assume we've got a simple, 100x100 cells grid-based generated mesh that will serve as the game's level: This mesh is exported as either .obj or .glb and imported in Godot. The player (...
Noideas's user avatar
  • 19
0 votes
0 answers
55 views

I want some help/guidance. Suppose I have a character in a 2D world that has no size. That is, the character is a point mass. In this case I can arrive at a vertex of a polygon. Let's assume that all ...
HMPtwo's user avatar
  • 101
1 vote
0 answers
126 views

I am currently trying to replicate skeletal mesh slicing, akin to something Metal Gear Rising: Revengeance did. So far I've managed to successfuly get some puzzle pieces of this whole thing together, ...
aallfik11's user avatar
1 vote
1 answer
394 views

I have a irregular 2D polygon, it is a PackedVector2Array, how do I get its area?
Alejandro Garcia's user avatar
1 vote
1 answer
199 views

I have a spatial hashing grid that's mapped out like ...
Pen's user avatar
  • 13
0 votes
1 answer
110 views

Here are images of real tanks and I drew arrows into the places with slight damage: In video games, are those made by modifying the geometry or with textures?
kyopa's user avatar
  • 143
0 votes
0 answers
124 views

I know how to move a point in a direction in 2D space it's like this: pointX += sin(angle) * movementSpeed; pointY += cos(angle) * movementSpeed; How do I do the ...
Earthmars643's user avatar
1 vote
2 answers
172 views

I am implementing 2D collision detection, and trying to tackle the problem of concave polygon vs. shape. The SAT works only for convex shapes. I was wondering if the following approach is a viable ...
Eilan Laken's user avatar
5 votes
3 answers
272 views

Say that in a 2D space I have the barycentric coordinates \$B=(B_x, B_y, B_z)\$ of point \$P\$ relative to triangle \$T\$. I now need to calculate the barycentric coordinates \$B'\$ of \$P\$ relative ...
Gabriele Giuseppini's user avatar
0 votes
1 answer
163 views

I'm trying to draw a hollow rectangle (i.e. the border of a rectangle without the middle) using a unit square plus normals. The actual positions are being calculated in my vertex shader. For example, ...
junglie85's user avatar
  • 123
2 votes
1 answer
410 views

I'm making a space game using Godot 4, and I need to capture the "hugeness" of planets. I figured I'd use spheres with textures on them for planets. The textures have identifiable ...
w94n9's user avatar
  • 21
0 votes
1 answer
81 views

I am developing a mod for a game with a Lua api. I am trying to detect if I am looking through from behind a window when I shoot an enemy. For context, when I shoot through this window I apply a ...
Ben R's user avatar
  • 1
1 vote
2 answers
281 views

I have a problem more closely described on a picture below. The idea is that I have my agent in point A and I want to get to the point B. The problem is, that agents rotation towards point B is alpha ...
Peter's user avatar
  • 13
21 votes
2 answers
8k views

I'm new in Game development and probably this is a silly question. I had a look online but haven't found a clear answer, I did it bit quick but enough to evaluate that this is a confusing topic ...
Federico Baù's user avatar
0 votes
1 answer
171 views

If I am rendering quads, but all the quads will be axis-aligned (that is, their plane is always parallel to either the X Y or Z plane), I thought I could cut vertex video memory usage in half by ...
CPlus's user avatar
  • 153
10 votes
3 answers
9k views

Assume that a face of a mesh is defined by vertices A, B, C and that the normal of the face ...
Carpetfizz's user avatar
2 votes
0 answers
90 views

This is almost more a geometry/mathematics question than a game dev one, but I think I'll have a better chance actually understanding the answer if I ask here. Rather than try to explain it- because ...
Keith Stein's user avatar
3 votes
0 answers
432 views

I have a given infinite camera frustum defined by four planes, each defined by a normal (left, right, bottom, top). From those planes we can also easily get the camera position and the view direction. ...
Lukas Kalbertodt's user avatar
1 vote
1 answer
168 views

I have multiple planes whose vertices are transformed to a position on a sphere in the vertex shader. The GLSL function called pointToSphere transforms a point <...
Miguel Myers's user avatar
0 votes
1 answer
147 views

I'm following this guide to implementing collisions in 2D physics. It shows this diagram, but I don't understand how to calculate the values of Da and ...
noodle_run's user avatar
0 votes
0 answers
325 views

I have an arbitrary array of points that describe vertices of the polygon 2D, they ar in order. To generate plane mesh for that, I need to generate tris. For something like circle/hexagon/square it is ...
Kirikan's user avatar
1 vote
0 answers
47 views

The polygons are small 3D parts of a quasi sphere centered in the origin and a solution that works in the plane can easily be made to work in this world. I tried to move the outline inwards by using ...
August2323's user avatar
2 votes
2 answers
334 views

I have a circle in 3D space, so we have center C with radius r, and the normal of plane the circle lies on, N. There is also a normalized vector V that I am modifying to go far past the circle's ...
A well-rested dog's user avatar
3 votes
2 answers
325 views

I'm trying to make a racing game that measures your distance from the center-line of the road. To do this I need to check on which part of the road the player is, so the calculation is correct. (If it ...
NationalGeographicProgrammer's user avatar
0 votes
1 answer
129 views

In my project, I have created a normalized cube using six plane meshes. To improve its visual quality, I added a displacement texture and calculated the normals for that texture to ensure proper ...
Memory1's user avatar
0 votes
1 answer
100 views

I am Unity game developer with more than 2 years experience. I am working in a personal project, a mobile game for Android in Unity. I am trying to make a camera controller for a 3D Cube Game in Unity....
DamagedCyborg's user avatar
0 votes
1 answer
65 views

I am trying to create a map for my game using a list of cuboid sections that are defined like this: ...
Maxim Gershkovich's user avatar
0 votes
0 answers
35 views

The game is in 2D. Let's say I have two bodies: A and B, each with position, angle, velocity vector, and angular velocity (I'm not sure yet if I should be using angles, or rotation matrices). Given a ...
HolyBlackCat's user avatar
  • 2,054
0 votes
2 answers
646 views

I am making a game similar to Volfied using Unity: The player outlines an area using straight lines, either horizontal or vertical. I am stuck at the algorithm to decompose the area into rectangles ...
nicklowkc's user avatar
  • 101
0 votes
2 answers
349 views

For the 2D game that I'm building, I want some entities to be able to use areas of attack, such as a wedge/circle sector area of attack. In this case, the circle sector is a pie-slice shaped section ...
WulffHunter's user avatar
0 votes
1 answer
181 views

I'm completely bewildered by the Geometry2D.make_atlas() method. I believe it has to do with texture atlases based on its name and comment on its source code but am ...
Javlin Joslin's user avatar
0 votes
1 answer
550 views

Ok, am I misunderstanding how Unity quaternions work, or is there a bad (about 2 degrees difference!) floating point error? The TLDR is I use a quaternion r to rotate vector v and put the result in w. ...
user1895149's user avatar
0 votes
1 answer
430 views

I have vertices that generate the first out of two pyramids. However, I want to have the second pyramid facing downwards as to make an octahedron. What are the correct vertices to use, because I've ...
Chillzy's user avatar
  • 47
0 votes
1 answer
204 views

For a project of mine, I need to render spheres without loading a pre-made model or using built-in functions. I found this bit of code on the internet that seems to work but I really want to ...
Chillzy's user avatar
  • 47
0 votes
1 answer
130 views

I have two meshes (A and B) and I know that a triangle in A has the same size and same angles as a triangle in B. For simplicity, suppose A is an octahedron and B is a tetrahedron. And suppose the ...
nkint's user avatar
  • 961
0 votes
1 answer
306 views

I've an Icosphere GameObject: I want to iterate over each of the faces and change the material based on their distance from the center, however I don't seem to be able to retrieve the list of ...
TomSelleck's user avatar
0 votes
0 answers
62 views

I have a bicycle with suspension and need to find the contact point of the wheel on the "road". If the front fork was pointing straight down, it would be as easy as doing a raycast down the ...
Charl Cillie's user avatar
1 vote
1 answer
248 views

Image attached below for clarification: So here we have a plane with a random rotation in 3D space, and we have the values for P1, P2, and the plane normal. How do I find the points X1 and X2? This ...
Pooper's user avatar
  • 23
1 vote
1 answer
92 views

I am trying to spawn entities on the circumference of a circle. These entities may be removed at any time, including all of them being removed. Periodically I would like to add an element on the ...
stats's user avatar
  • 135
0 votes
1 answer
123 views

I'm currently working on a particular project where orthographic and perspective projections are both used interchangeably. To keep the transition between both projection modes somewhat seamless, I ...
JJJohan's user avatar
0 votes
1 answer
203 views

In my game there's a part where a bunch of circles need to evenly spread around a point. Like in this demo below: ...
Ryan Peschel's user avatar

1
2 3 4 5
11