Tagged Questions
0
votes
1answer
39 views
Sharp DX Identity Matrix, Matrix.Forward vector pointing at negative Z
I'm trying to take a steady grip on Sharp DX. Already done some work like translating, scaling and rotating objects. Now i have to calculate the rotation matrix using only direction vector and ...
3
votes
2answers
124 views
What kind of projection is ScreenX=X/Z, ScreenY=Y/Z?
I have an existing class which transforms 3D vectors and projects them on a 2D plane (Camera). The code is all written in C without help from an external library.
To project a single vector (X,Y,Z) ...
3
votes
3answers
292 views
Tetris - Rotations using Linear Algebra (Rotation Matrices)
I'm making Tetris in Java and am at the point of rotations... Originally I was hardcoding each rotation:
if (direction.equals("right")) {
if (shape.equals("Bar")) {
if ...
1
vote
0answers
66 views
Rotate Points with Object in world space
I posted this in the original stack overflow then realized that a game-dev specific one exists.
I am working on personal project that requires me to have 4 points surrounding an object (1 at each of ...
5
votes
1answer
109 views
Rotating plane to be parallel to given normal via change of basis
I have two planes and their respective normals. I would like to rotate the second plane, planeB, so that it is parallel to the first, planeA.
To do this, I am using a change of basis to rotate each ...
0
votes
0answers
44 views
Transform a Screen Delta
I have a delta in screen coordinates that I want to transform to a 3d delta in world space.
The delta is in this case a movement across the (x,y) coordinates in screen space on the near projection ...
1
vote
2answers
196 views
convert orientation vec3 to a rotation matrix
I've got a normalized vec3 that represents an orientation.
Each frame of animation, an object's orientation changes slightly, so I add a delta vector to the orientation vector and then normalize to ...
0
votes
1answer
91 views
How to Draw texture between 2 Vector3
My scenario:
RTS combat style, 1 unit fires beam on another unit
My problem is i want to draw a flat texture between 2 Vector3 points. I have looked at various Billboarding styles but that doesn't ...
3
votes
2answers
315 views
3D rotation matrices deform object while rotating
I'm writing a small 3D renderer (using an orthographic projection right now).
I've run into some trouble with my 3D rotation matrices. They seem to squeeze my 3D object (a box primitive) at certain ...
1
vote
1answer
355 views
how can i get rotation vector from matrix4x4 in xna?
i want to get rotation vector from matrix to realize some parent-children system for models.
Matrix bonePos = link.Bone.Transform * World;
Matrix m = Matrix.CreateTranslation(link.Offset)
* ...
3
votes
1answer
99 views
How to make an object stay relative to another object
In the following example there is a guy and a boat. They have both a position, orientation and velocity.
The guy is standing on the shore and would like to board. He changes his position so he is ...
2
votes
1answer
220 views
Transform 3D vectors between coordinate systems
I've got 6 points in 3D space: A,B,C,D,E,F, that represent 4 vectors. AB is perpendicular to AC and DE is perpendicular to DF.
I need to find a transformation matrix M, that transforms AB to DE and ...
2
votes
1answer
239 views
multiply matrix by vector: what to do if need to change y-up to z-up?
I multiply a matrix with a position vector to get a new position, however, now I need to change my matrix from y-up coordinate space to z-up. Changing only the matrix won't work: how to apply the ...
1
vote
1answer
293 views
How to prevent 2D camera rotation if it would violate the bounds of the camera?
I'm working on a Camera class and I have a rectangle field named Bounds that determines the bounds of the camera. I have it working for zooming and moving the camera so that the camera cannot exit its ...
2
votes
1answer
262 views
How do you extract a Vector3 positions only from a world matrix in an array of positions (from Kinect)
've just started building a physical camera class for the depth data you get from a Kinect. I have a Vector3 array of [imageWidth, imageHeight] describing the LOCAL positions I get in from the kinect ...
2
votes
1answer
319 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 ...
6
votes
2answers
870 views
Vector games (Wireframe, Elite-like) theory and implementations?
I'm interesting in knowing more about how vector games like Elite and Star Wars Atari were built from grounds up. The question is not how to implement vector graphics with modern 3D APIs like OpenGL ...
8
votes
1answer
393 views
Downprojecting an imaginary 4D mesh to the screen
As a mental exercise, I'm trying to imagine projecting an arbitrary 4D mesh onto the screen (2D).
I'm guessing a single 4D triangle would still consist of only 3 points, however each of those 3 ...
1
vote
1answer
179 views
Mesh to world vector translation
Suppose I have a world defined in typical OpenGL coords.. then the up vector defined for this space is (0,1,0).
Now, if I load a model that is defined with (0,0,1) as its up vector, what are the ...