Tagged Questions
3
votes
3answers
182 views
Getting correct angles between Vector3s
I'm working on a project where you can draw lines between points. You select one point and drag the mouse onto another point and a line is drawn between them.
The line itself is a 3d object which is ...
1
vote
0answers
84 views
Numerically stable(ish) method of getting Y-intercept of mouse position?
I'm trying to unproject the mouse position to get the position on the X-Z plane of a ray cast from the mouse. The camera is fully controllable by the user. Right now, the algorithm I'm using is...
...
2
votes
4answers
550 views
Simulating a sine wave/oscillating pattern for enemies
I'm creating a simple top down shooter, right now I have an enemy which simply follows the player. I'd like to change things up and have the enemies move towards the player but in a wave like motion. ...
1
vote
2answers
162 views
How to offset particles from point of origin
Hi I'm having troubles off setting particles from a point of origin. I want my particles to spread out after a certain radius from a the point of origin. For example, this is what I have right now:
...
2
votes
2answers
271 views
Calculating the correct particle angle in an outwards explosion
I'm creating a simple particle explosion but am stuck in finding the correct angle to rotate my particle. The effect I'm going for is similar to this:
Where each particle is going outwards from the ...
-1
votes
1answer
271 views
Breakout… Getting the ball reflection X angle when htitting paddle / bricks
Im currently creating a breakout clone for my first ever C# / XNA game. Currently Ive had little trouble creating the paddle object, ball object, and all the bricks. The issue im currently having is ...
3
votes
1answer
291 views
Finding closest object to a location within a specific perpendicular distance to direction vector
I have a location and a direction vector indicating facing, I want to find the closest object to that location that is within some tolerance distance (perpendicular distance) to the ray formed by the ...
1
vote
1answer
599 views
Interpolation between two 3D points?
I'm working with some splines which define a path a character follows (you can see a gameplay video here to get a better understanding of what's going on: http://www.youtube.com/watch?v=BndobjOiZ6g). ...
3
votes
2answers
295 views
Tessellating/Subdividing a quad
I am creating a quad that starts as a single quad, then divides itself multiple times (from 1 -> 4 -> 16 -> 64 -> 256 etc) but I have encounted an issue. When I get to 64 sub divisions only 16 quads ...
2
votes
1answer
312 views
Confused about order of operation when using a Matrix in XNA, C#
Here are two different pieces of code
This is what I started with
Vector2 hold = Vector2.Transform(pos1, mat1);
Matrix inv = Matrix.Invert(mat2);
Vector2 pos2 = Vector2.Transform(hold, inv);
And ...
2
votes
1answer
274 views
Moving two objects proportionally
I'm trying to move two objects away from each other at a proportional distance, but on different scales. I'm not quite sure how to do this. Object A can go from position 0.1 to 1. Object B has no ...
1
vote
1answer
799 views
Line segment / circle intersection - X value seems wrong?
Major Edit
I'm making a Breakout clone, and having difficulty with collision detection between a circle and line segment.
Apologies, my earlier question was a result of frustration and no sleep :)
...
6
votes
1answer
3k views
Get position of point on circumference of circle, given an angle?
I would like to know how to get a specific point on the circumference of a circle, given an angle. The diameter of the circle is 1, and the center point of the circle is { X: 0.5, Y: 0.5 }.
3
votes
3answers
3k views
Getting the angle between two objects?
I have a set of boxes which create a sort of path, they don't intersect very smoothy and to help that process I'm trying ot find a way to get an angle between them that can make it easier to generate ...
1
vote
1answer
170 views
An ellipse outside two points?
I am trying to generate an ellipse outside two points (two-dimensional vectors).
Is there a formular for that, or a cool way of doing that in C# XNA?
What I am trying to do is have a particle circle ...