The tag has no wiki summary.

learn more… | top users | synonyms (1)

6
votes
2answers
6k views

How to detect 2D line on line collision?

I'm a flash actionscript game developer who is a bit backward with mathematics, though I find physics both interesting and cool. For reference this is a similar game to the one I'm making: Untangled ...
6
votes
3answers
937 views

For normal mapping, why can we not simply add the tangent normal to the surface normal?

I am looking at implementing bump mapping (which in all implementations I have seen is really normal mapping), and so far all I have read says that to do this, we create a matrix to convert from ...
12
votes
3answers
894 views

Biased, conservative random walk

I have a sprite which has Velocity and Position, either stored as Vector2. At each Update cycle, velocity is added to the position. I would like to give the sprite a third vector, Target. New targets ...
2
votes
1answer
425 views

How to linearly transform vertices for large coordinate systems

Alright, so I'm working on a space game and well, I want it to have a lot of space! So I need a large coordinate system and for my rendering pipeline to not suffer from "vertex jittering" due to ...
7
votes
0answers
188 views

What is Direction Cosines applications in game development? [closed]

I am reading about direction of cosines which it seems to tie into change of axial system(transform of one coordinate system to another) and its just not clicking in my head. I don't know if its the ...
9
votes
2answers
2k views

How can I test if a point lies between two parallel lines?

In the game I'm designing there is a blast that shoots out from an origin point towards the direction of the mouse. The width of this blast is always going to be the same. Along the bottom of the ...
2
votes
2answers
1k views

Dot Product Vs Cross Product Turning a Turret Towards A Enemy and firing

http://pastebin.com/iw9DHf7s is code demonstrating dot product turning a turretto a target and firing. It works and chooses best angle to spin. A problem can occur when game goes faster (better ...
0
votes
1answer
94 views

Finding the angle of a line given 2 other lines

I'm trying to implement some 2D vehicle physics. For this to work I have 2 wheels attached to the body of the car. After doing some collisions checks I place the wheels at their new position. Say the ...
3
votes
4answers
2k views

What is an efficient 2D line-segment-versus-triangle intersection test?

In a 2D plane, I have a line segment (P0 and P1) and a triangle, defined by three points (t0, t1 and t2). My goal is to test, as efficiently as possible ( in terms of computational time), whether the ...
1
vote
2answers
355 views

Learning C++, algorithms and vectorial algebra [closed]

I need your recommendations for a good study source about videogame orientated C++, algorithms and vectorial algebra. I will be applying to a videogame programmer course in January so I need to start ...
3
votes
1answer
170 views

Make an object slide around an obstacle

I have path areas set up in a game I'm making for canvas/html5 and have got it working to keep the player within these areas. I have a function isOut(boundary, x, y) that returns true if the point is ...
3
votes
3answers
1k views

Equation to make small number big and big number small (gravity)

I have a sprite that I want to speed up as it gets closer to another object. I really want this to flow well and don't want a series of if statements. All I can think of is to take the distance and ...
-5
votes
3answers
1k views

How can I find a point on a line when I have only two other points?

I have a straight line passing from points A(2,-1) and B(4,5). I want to find a point C that is on the line and outside A-B.
1
vote
3answers
127 views

Finding which side one point is from another point

I have a simple question I think, if point a is to the right of another point I a dirx to be 1, otherwise -1. Likewise for a diry var, if it's above the other point I want it to be -1 otherwise 1. ...
4
votes
2answers
471 views

Enemy mathematical behavior

I'm really trying to up my game in game mathematics and now I'm working on enemy movement and a bit of AI. I have an enemy with two modes attack and avoid, based on an integer avoid variable that's ...
6
votes
4answers
3k views

How do I find the intersection of two lines

I have a bounding box on my character, its position in the previous frame an the current frame. The bounding box is axis aligned. My character is running around inside a cave, I have a list of ...
7
votes
3answers
2k views

Rotating a vector by another vector in shader

I have a terrain surface with a normal for each point on the terrain. I have a second detail normal map to be applied to the terrain. These normals are in 3-space. The Y value of both normals is ...
12
votes
6answers
5k views

Math topics for 3D graphics programming

I understand that the following math topics are required for 3D graphics programming. I have started doing some of them in my math course. Can someone point me in the direction of a resource that ...
1
vote
2answers
424 views

opengl rotations for a human

I currently can rotate around a pivot point by first translating to the pivot point then performing the rotation and finally translating back to the origin. I do that easily enough for the shoulder in ...
8
votes
4answers
855 views

Moving objects colliding when using unalligned collision avoidance (steering)

I'm having trouble with unaligned collision avoidance for what I think is a rare case. I have set two objects to move towards each other but with a slight offset, so one of the objects is moving ...
4
votes
1answer
1k views

Points on lines where the two lines are the closest together

I'm trying to find the points on two lines where the two lines are the closest. I've implemented the following method (Points and Vectors are as you'd expect, and a Line consists of a Point on the ...
4
votes
2answers
6k views

View matrix in opengl

Sorry for my clumsy question. But I don't know where I am wrong at creating view matrix. I have the following code: createMatrix(vec4f(xAxis.x, xAxis.y, xAxis.z, dot(xAxis,eye)), vec4f( ...
6
votes
1answer
2k views

Ray Intersecting Plane Formula in C++/DirectX

I'm developing a picking system that will use rays that intersect volumes and I'm having trouble with ray intersection versus a plane. I was able to figure out spheres fairly easily, but planes are ...
3
votes
4answers
3k views

Line triangle intersection - last bits

I'm doing line-triangle intersection. I have found the intersection point (vector) on the plane. All I need to do now is work out whether the point is inside the triangle it collided with (not the ...
4
votes
1answer
320 views

Line plane intersection: what is this variable?

I'm doing line plane intersection, and have come across an un-referenced variable or constant in the tutorial I'm following. One of the formulae given is this: t = N dot (p2 – p0) ...
7
votes
2answers
266 views

Draw land for motocross game

I would like to draw a land for a motocross game. I've been thinking of Bezier Curves but I am not sure whether this is the best approach. Can you give me some advice? I want to do it in JavaScript, ...
20
votes
6answers
4k views

What is a good linear algebra book for game programmers?

I was told that I should start learning Linear Algebra in order to create good games with good physics. I'm reading Linear Algebra book and it's completely foreign to me. The author starts out with ...