Skip to main content

Questions tagged [linear-algebra]

Linear algebra is the branch of mathematics concerning vector spaces and linear mappings between such spaces. The tag is generally used for questions regarding calculations over vectors.

Filter by
Sorted by
Tagged with
1 vote
1 answer
168 views

I'm creating a procedural aiming animation system in UE5 as a learning experiment. In order to position the hand for aiming down sights, I'm using a forward vector from player camera to project out a ...
AuStephen's user avatar
0 votes
1 answer
102 views

I am creating an AR game in where I would like to virtualize an 8-ball pool table. Since semantic labeling is practically useless, I would like to have some manual placement of objects and some ...
shanji97's user avatar
  • 302
0 votes
1 answer
161 views

I am learning about the graphics pipeline. My understanding of the view transformation is that you: First create a normalized, separate coordinate system for the camera, based on its position and ...
Jared Kosiba's user avatar
1 vote
1 answer
578 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
1 vote
1 answer
72 views

I'm trying to create a panning control for a camera in bevy, but I can't seem to get the panning logic right when the camera is rotated. It works fine if the camera transform is directly facing the XY ...
The Bic Pen's user avatar
1 vote
1 answer
93 views

I've been having trouble trying to make a solidworks style Orbit Camera, nothing I do seems to work even though apparently it should (I've tried multiple methods and this seems to be the most ...
wij's user avatar
  • 11
0 votes
1 answer
195 views

I'm not a maths person and the formulas you see on maths type questions/answer with all the symbols is completely beyond me - I'm sorry. However I had help about 18 months ago to turn a provided ...
iOSProgrammingIsFun's user avatar
2 votes
0 answers
122 views

Context I want to find the up vector an object would have if it were leaning on a surface, given a large amount of points on that surface and their associated surface normals (i.e., an equation that ...
natSegOS's user avatar
1 vote
0 answers
78 views

I'm following in the footsteps of this blog in implementing a transform hierarchy to my game engine scenes. I have a fairly similar implementation for a 3D transform: ...
Boyfinn's user avatar
  • 111
1 vote
2 answers
279 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
0 votes
0 answers
47 views

I am writing a simple graphics engine using Rusts WGPU. I have a Sphere rendering at the origin of my scene like so: ...
shaneB's user avatar
  • 1
0 votes
1 answer
66 views

If I have an equation: |A×B|=A.B What would be the angle in between A and B?
Zie's user avatar
  • 1
0 votes
1 answer
114 views

Given a Vector2(x,y) that represents an object's velocity, like so: ...
CAOakley's user avatar
  • 101
0 votes
1 answer
211 views

What I'm doing: I'm moving a projectile to it's target along a Bézier curve with one control point. The projectile moves from Transform A to ...
PayasoPrince's user avatar
0 votes
2 answers
446 views

Here's a list of math functions I'm having trouble finding a direct function match for in Godot C#: ...
Ethan's user avatar
  • 145
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
0 votes
0 answers
321 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
2 votes
2 answers
330 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
0 votes
2 answers
194 views

I have an Isometric 2D grid-based tilemap, and am firing a projectile (at Vector P1 in image below) from the player (at Vector A) to a location "above" a target location (at Vector B). This ...
user46346's user avatar
  • 101
0 votes
0 answers
75 views

I'm trying to write a common 2D game and using vectors for physics. I have 1 wall and 1 player object that can move diagonally (both are squares without rotation). When the player object collides with ...
ZAK's user avatar
  • 1
0 votes
2 answers
324 views

I am trying to set the terrain's heights data at runtime with a simplex noise function, while stumbling with converting the local position of the vertices to global position to use as input to keep ...
Willem's user avatar
  • 165
1 vote
0 answers
253 views

I am working on a 2D side scroller. I have created an enemy character that shoots at my player randomly within a specific time interval. So, I want to deflect the projectiles back toward the enemy ...
shanksVR's user avatar
0 votes
1 answer
1k views

For various reasons I am building a very simple graphics engine. I have a pretty good 2D thing using plain SDL2 and C that essentially boils down to a single "putpixel" function. I can ...
MalphasWats's user avatar
0 votes
1 answer
62 views

I have VC++ code for DX9 that draws shadows perfectly. ...
black4joss's user avatar
0 votes
1 answer
181 views

I have the car's current position Vector3 and an API that gets me the closest point on the middle of the road to any Vector3 ...
mLstudent33's user avatar
1 vote
1 answer
235 views

I have this code that inserts a triangle into the drawing list. The PHD_VBUF structure stores one x,y,z vertex. If the vertex is behind the front plane, then ...
black4joss's user avatar
0 votes
0 answers
70 views

Related to this question How to project a Vector3 onto the xz plane? ...
mLstudent33's user avatar
1 vote
1 answer
1k views

I have this code that tries to check whether a lobbed grenade will head toward a teammate: ...
mLstudent33's user avatar
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
193 views

I've created a 2d gradient shader which uses an absolute start/end point to determine how an arbitrary amount of colors are positioned along the gradient line. I now am creating an api to create a ...
bingo_boingo_bungus's user avatar
0 votes
1 answer
99 views

Let us say we have a gltf asset. Let us say we want to apply an arbitrary linear transformation to the root node. We will say that the root node has a rotation, translation and scaling components. For ...
Makogan's user avatar
  • 270
0 votes
2 answers
1k views

So I have created spaceship shooter game where ships have turrets on them . Now I want those turrets to shoot a moving target meaning I want the projectile to intercept and hit the target that is ...
GoldSpark's user avatar
0 votes
1 answer
3k views

I have some confusion that I need to be cleared up about the atan2 function. I am making a game in Godot where a 2D ship rotates to face some object in space by ...
GoldSpark's user avatar
0 votes
1 answer
262 views

I have a turret game object and a player game object, say it's a spaceship. Right now, every frame the turret updates its rotation, so it's always pointing at the player, giving it potentially ...
Christian Finke's user avatar
0 votes
2 answers
373 views

I am trying to figure out the velocity of ball A after collision, which is V2.A as seen in the figure. I know that the velocity of ball A is perpendicular to the line connecting centre of ball A and B ...
ahmedkl's user avatar
  • 57
1 vote
1 answer
2k views

I have object I'm scaling by setting its localScale to (1, 1, 1) multiplied by a float size. ...
jasmine zhao'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 votes
1 answer
143 views

I'm trying to move my Character on the world's XYZ Axes, but how do I get them? I'm trying to do this because my Player is sort of a Sphere and is rolling around, so its xyz directions are rotating. I ...
Silwan's user avatar
  • 3
0 votes
0 answers
80 views

I'm trying to calculate the speed of a ship, depending on many factors. the speed of the wind the relative angle between the sails forward and the wind forward. transformed into ...
Mad Hatter's user avatar
0 votes
1 answer
263 views

I would like to transform a rigidbody's world velocity into a local velocity based on a normal direction. When the rigidbody is moving towards and within a range of a object, I use a raycast to ...
Charl Cillie's user avatar
0 votes
1 answer
136 views

Per this answer to this question, a cheap way (i.e., without trig/sqrt) to convert from global to local space, given LocalOrigin, LocalI, LocalJ, and GloablPoint is (in rough pseudo code) ...
Moose Morals's user avatar
1 vote
1 answer
110 views

I have a spline generation system using a cubic Bézier algorithm. I created a tool that splits the spline and adds a new point where the user clicked on the spline, but it causes the spline to deform ...
Cyclone's user avatar
  • 51
0 votes
1 answer
1k views

I'm not using Unity or any other library for making game logic. I'm making a basic game logic that needs to do basic vector math on the backend side. I just wrote a direction function that needs to do ...
virtouso's user avatar
  • 2,680
2 votes
1 answer
2k views

I have 4 points as Vector3 in 3D space that shape a plane. How can I calculate the plane normal direction these four points create together, and express it as a <...
Cyclone's user avatar
  • 51
0 votes
1 answer
135 views

I know we need to get the inverse of transformation matrix first to get the coordinate relative to other frames. Explanation is in this video. I am reading directx11 book. And the following ones are ...
yldbear77's user avatar
0 votes
0 answers
192 views

I have just begun learning some 3d mathematics and OpenGL (trying to implement skeleton animation). I am stuck here when reading a book(Advanced Methods in Computer Graphics). I understand the first ...
potter john's user avatar
2 votes
2 answers
540 views

I'm trying to find this green vector and I've got three points A, B, C. How can I find that vector in Unity code-wise?
ClownOfMadness's user avatar
3 votes
1 answer
397 views

I am creating a real-time game where ships move through space using basic laws of motion. The ships move by rotating (instantly for our purposes) to an angle and then firing their engine to accelerate....
Liam D's user avatar
  • 41
0 votes
2 answers
260 views

I'm making a visual clue for the player to know where (and more or less when) an asteroid is going to enter the screen. For this I'm using a triangle pointing at the incoming object and color ...
Alex CB's user avatar
  • 386
1 vote
0 answers
317 views

I am studying obstacle avoidance steering behaviour. So far I got arrive seek flee, and wander behaviours working, so the math should be right. Why doesn't this avoid steer behaviour work, though? It ...
eguneys's user avatar
  • 247

1
2 3 4 5 6