Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

A 2D array of numbers, symbols or expressions, arranged in rows and columns. Each row must have the same number of columns. The numbers, symbols or expressions themselves are called elements or entries.

1
vote
0answers
17 views

Blender - Exporting and Replicating Bone Animation

I'm having trouble replicating Blender bone animation in my game. Bones that have a vertical rest position (Euler(PI / 2, 0, 0)) are animated correctly (e.g. head, neck, torso, legs, shins), however ...
0
votes
0answers
46 views

OpenGL Ray Transformations

Sorry for my english at first. I have method for ray intersection test and it works. If I apply a transformation to an object, the method does not see it. I think that happens because I'm using wrong ...
1
vote
2answers
30 views

How to access coordinates of objects in bullet physics (libGDX)?

I need to access the x, y and z coordinates of a bullet physics object. I'm assuming this is done via the transform matrix, but I have no idea which values mean what. There doesn't seem to be any ...
0
votes
1answer
21 views

Determine view-matrix with camera placed in a scene graph

My scene is organized with a simple scene graph where the child multiplies its transformation with the one of the parent. For normal objects, likes meshes, this works as expected, but I also want to ...
1
vote
0answers
25 views

Does it make sense for a view matrix to have a scale?

When building a view matrix from an SRT matrix multiply, examples (here and here) only ever compose it with a R and T. Does it make sense to have the S component be anything other than the identity? ...
0
votes
1answer
21 views

Display object at different position

Id' like to create impression of shaking holographic image of NPC in Unity 2018, but moving it with transform will cause unnecesary transform-rigidbody syncing, and using Rigodbody.position isn't an ...
0
votes
0answers
16 views

Billboarding Labels Using Quaternions

I am encountering some issues with billboarding. Although my situation is a bit complicated. So, I am modeling the solar system, and I am also placing labels on everything. For an example, I'll use ...
1
vote
1answer
58 views

How do Axis-Aligned Bounding Boxes update with rotations?

I have a bounding box class with a min (x,y,z) and max point (x,y,z). The object that is being rotated has a rotation matrix (3x3 matrix), but I don't know how to update the bounding box with ...
0
votes
0answers
20 views

Tetris like rotation with a list of points

I have a list of points that I want to rotate around the origin by 90, 180 or 270 degrees. This list can be an arbitrary shape such as: ...
1
vote
3answers
65 views

Rotation of a matrix with unequal rows and columns

I have this simple matrix class which has a char** array for storing the data. The data array gets initialized like this: ...
0
votes
1answer
59 views

OpenGL vector rotation matrix to a given point

I have a sphere with a radius of .5 The sphere is centred at 0,0,0 I am now trying to place items around my sphere based on a given x,y,z on the surface of the sphere. My items have been draw/...
0
votes
1answer
70 views

Sun model matrix

I'm playing with sun implementation in my engine and I correctly built model matrix using below order of matrix operations: Translate to camera position. Calculate x and y axis of rotation matrix ...
0
votes
0answers
36 views

Pseudo 3d roguelike: map representation [duplicate]

I know it's a very common question, so I'll try to be specific. I'm working on a pseudo 3d (like Dwarf Fortress or Cataclysm: Dark Days Ahead) roguelike. How you'd represent a map in a roguelike? Let'...
1
vote
1answer
76 views

Why does a translation matrix need extra row?

Following recommendation of this answer I've recently read the series of articles of Wolfire about linear algebra. I'm somewhat familiar with matrices and I came to a conclusion that vector and a ...
0
votes
0answers
27 views

anything wrong with a spherical camera view matrix?

Is there anything inherently wrong, if you derive your view matrix from 2 spherical coordinates (say, phi and theta) on the unit sphere? The z-axis vector would be at, say (phi, theta), the y-axis at (...
1
vote
0answers
29 views

OpenAL listener position for isometric camera

I have an isometric camera for an RTS that looks like this: Basically, I don't know how to set the listener's position in OpenAL because I represent the camera's position with only two coordinates. ...
1
vote
0answers
156 views

ANSI C (C11) math libraries? [closed]

I know there are a multitude of C++ math libraries out there, but my current project is C-only (C11). So far I've made due with writing my own matrix/vector functions, but now I need to do the more ...
-1
votes
1answer
28 views

How do i rotate my view on its own center

PROBLEM I am trying to translate and rotate my view, the translation works fine but when rotating the rotation is happening on the center of the world(0,0,0) instead of the view position. EXAMPLE ...
1
vote
1answer
27 views

How can I have more values in array on X axis than Y axis in my tilemap?

Following my old question Array of map data renders the map the opposite way after I got the answer to it and fixed my problem, I got another problem that occurs. If my ...
1
vote
2answers
90 views

Is clipping done before or after projection?

Is clipping applied after projection or before? How can it be applied after projection when a vertex is behind the camera and projected therefore mirrored? At this time I clip the triangle before ...
0
votes
1answer
40 views
0
votes
2answers
47 views

How to keep an object in a certain part of the camera view?

I have a 3d camera that is viewing a character that is moving. As the character is moving i want the camera to adjust itself so as to keep the character in the left third of the camera view. I ...
1
vote
1answer
35 views

Texture does not fit the screen

Hi guys I am really new in OpenGL-ES and I am developing a simple android application with NDK, and I just want to ask why the image is not fit after I set the width and height of it. this is my <...
0
votes
0answers
33 views

FreeGLUT - Making Planets Orbit at their own Speed

I'm currently working on a project for Uni using FreeGLUT to make a simple solar system simulation. I've got to the point where I've implemented all the planets and have used a Scene Graph to link ...
1
vote
1answer
71 views

Camera movement issue with pitch and yaw angles

I'm trying to implement a simple first person camera using pitch and yaw angles (no quaternions, I want a simple camera for debugging purposes). An Input class processes mouse input and translate the ...
0
votes
0answers
31 views

Skinning - Bone Matrices Clarification

I'm trying to create the simplest animation scenario, 12 vertices and 2 bones. Both bones has a 4x4 matrix. When both are set to "Identity", the model looks correct, like in the picture above (...
0
votes
1answer
47 views

Camera rotation is weird when it's a child of another object

I implemented scene graph hierarchy into my 3D game engine, and there seems to be a problem with the camera's rotation when it is a child of another object. It only happens with the camera, not any ...
2
votes
1answer
155 views

Why do these DirectXMath functions seem like they return column-major matrics?

I know these questions have been asked a million times in various formats, but I'm getting weirdly skeptical about some of the row-major vs. column-major claims about the DirectXMath library. If I ...
0
votes
0answers
28 views

Calculating Offset Matrices for 3D Animation

I am experimenting with SkinnedMesh sample in Microsoft DirectX SDK June 2010. I am trying to understand how offset matrices work. The .X format comes with Offset matrices for every bone, but I am ...
0
votes
1answer
31 views

Change center point and size with the help of the Matrix in Unity

Let us suppose I have an array of Vector3, it contains vertices. Now I want to scale the vertices and/or change the center point of the texture (move texture ...
0
votes
1answer
216 views

What is FRotationMatrix in Unreal engine 4?

I am working on FPS shooter example in Unreal engine 4 documentation. One of the lines for forward movement of pawn is ...
0
votes
0answers
30 views

Help, stuck and I don't understand how to create a .bvh file?

I am attempting to write a .bvh exporter from scratch (in c#). I am happy with the hierarchy part but I am at a loss for the "MOTION" section and what each rotation value represents. Motion Section: ...
0
votes
0answers
135 views

Unity's Quaternion to Matrix conversion failure

There's a new error in Unity 2017.2, opened at Unity Issue Tracker here. Here it is: Assertion failed: Quaternion To Matrix ...
-1
votes
1answer
78 views

Get enemy/chaser object to face player object - OpenGL

My chaser object will not face the player object. It simply keeps spinning around and won't face the player. ...
1
vote
2answers
65 views

TRS Matrix between 2 points

I have got 2 Points in 3D Space whose TRS Matrix' from 0.0 to there current place is known. Now I want to change the Matrix of the left point so that the matrix of the right point combined with the ...
0
votes
0answers
24 views

How to set/clear parent and maintain world position/scale/rotation in a transform hierarchy

I am attempting to code a Transform hierarchy similar to Unity's. I am able to successfully combine local position, rotation and scale, as well as to multiply child transforms by their parent ...
4
votes
1answer
79 views

Camera rotation deforms objects

I'm working on a ray-tracer in C++ with an adjustable camera for a university assignment. I'm entirely new with graphics and I'm struggling with one thing. I have a matrix as a mat4 object (4x4 ...
0
votes
0answers
61 views

Combining Rotations C++ Matrix

I'm trying to combine a look at operation with a local rotation operation like this image To rotate my 2d sprite plane to face the sphere, then to rotate around the z axis while point at the sphere. ...
1
vote
1answer
77 views

Split a grid into shapes that can be moved back from 4 directions

Basically I have 4 grids Left, Right, Top, Bottom. Player can choose each of them and move all the blocks on that grid to the Middle grid to fulfill it, like tetris from 4 directions: ...
0
votes
1answer
63 views

LibGDX trying to create a matrix of circles

I am trying to create a circular stage like so: But I can only make a square:
1
vote
0answers
99 views

Setting relative anchor point via matrix

The page at https://webglfundamentals.org/webgl/lessons/webgl-2d-matrices.html provides an example for rotating around the center of the image: ...
3
votes
1answer
1k views

lookAt with orthographic camera (gl-matrix)

Technically this is a webgl question though I think it's generic enough to get some opengl, erm, perspective on it too... If I setup an orthographic camera (perspective matrix) like this: ...
1
vote
1answer
1k views

How to mirror/reflect/flip a 4D transformation matrix

I am importing my animation keyframe joint data from Blender to my game engine. The joint data is a set of 4D matrices. Things are looking good except a remaining issue where the animation is facing ...
0
votes
1answer
191 views

How to Convert a Z Up Matrix to a Y Up Matrix?

My 3D program exports my vertex data and instancing matrixes in Z+ up format. I want to store them in my own data format as Y+ up. If given a Matrix4 describing a position with Z+ being up. How can ...
0
votes
1answer
217 views

Matrix multiplication order for multiple model transformations

I have a problem in terms of what frame of reference, I should construct, scaling (S), rotation (R) and translation (T) for a model matrix (in that order). Let us assume the use of glm (or glsl), i.e. ...
4
votes
2answers
181 views

Prevent tile layout gaps

I'm making a map viewer where you can specify where tiles go in a map and then see it on the screen, translate it, and zoom in and out. Here's a picture showing the tiles used to make my example map ...
1
vote
0answers
288 views

SceneKit-Convert a rotation vector into rotation matrix

I'm very new and I'm studying this ARKit code from RPasecky/CubesInSpace on github where he/she convert the point of view 's rotation vector into a rotation matrix ...
0
votes
1answer
61 views

Matrix transformations vs manipulating vertex data directly

I was wondering whats more efficient to do if you want to transform a mesh. 1) Transforming a matrix and pass that to a shader or 2) Manipulate the meshs vertex data directly I was wondering because ...
0
votes
1answer
796 views

Convert Quaternion to Matrix4x4

I'm trying to set Gizmos.matrix which is a 4x4 by matrix such that the gizmos drawn match the rotation of the object. However, I'm not sure how to convert the ...
0
votes
0answers
331 views

Creating a rotation matrix from an up vector without using trigonometry

I'm looking for someone who really understands vector and matrix algebra. I have a coordinate in 3D space whose origin is the centre of the Earth, and I want the coordinates to be on a flat plane at ...