Transformation in game development is usually refers to linear algebra operations on points, vectors and matrices.

learn more… | top users | synonyms (1)

0
votes
1answer
28 views

Should a transform class store a matrix or seperate position/rotation/scale values?

I'm creating a transform class to make storing the transform of individual objects in a scene easier, but I'm unsure on how to do it. I could create one like this: class Transform { public: ...
0
votes
1answer
36 views

Transforming normals along with vertex? (GLSL)

So, I got a model matrix (Via uniform variable) in the shader, is there any way to use the model matrix to transform the normal of a vertex that has been transformed with glm::transform/rotate? If ...
1
vote
1answer
961 views

Libgdx, how do i get the translation and rotation of a node from a model instance?

I have a model instance of a character, and a model instance of a sword weapon. THe character has a node on his right hand so he can "carry" the sword. Right now I use this code so the sword's ...
2
votes
2answers
51 views

Strange behavior with transformation matrix

I'm fairly new to transformation matrices. I'm using them to translate and rotate nodes and their child nodes. The following code works when applied once, but shows strange behavior when applied many ...
2
votes
1answer
430 views

How do I animate Unity GUIComponents?

I want to transform my GUIWindow from the bottom of the screen to the middle whenever the user presses a button. How can I do this?
2
votes
1answer
712 views

importing animations in Blender, weird rotations/locations

This is for the Blender 2.6 API. There are two problems: 1. When I import a single animation frame from my animation file to Blender, all bones look fine. But when I import multiple (all of the ...
0
votes
1answer
61 views

Aspect ratio of drawn quad messed up after rotating

When I draw a quad that is rotating the aspect ratio of the quad gets messed up and the size changes. Gif of what is happening I am confident it has something to do with the way I calculate the size ...
0
votes
0answers
17 views

Rotate object from an origin using a transformation matrix

I'm making a project in lib GDX and I want to rotate an object by changing the transform matrix of the sprite batch to one that rotates an object rendered on screen a given number of degrees from a ...
4
votes
1answer
84 views

Do matrix manipulations for 3D graphics ever produce singular matrices?

A singular matrix is a matrix that cannot be inverted. The vecmath library, for example, throws a SingularMatrixException if you try to invert a singular matrix. I think I understand what singular ...
0
votes
0answers
10 views

Collision Hull not Transformed Correctly

My collision hulls aren't aligned after my "engine" digests them. I used Spine to create my content. So here is the hierarchical model of my bones. Where Root, LoadGame, NewGame, QuitGame, and ...
1
vote
1answer
33 views

Should I store local forward/right/up vector or calculate when necessary?

I'm working on an object picking and translation/rotation/scale gizmos system in my engine where you select objects and perform transformations on them in a 3d editor-like fashion (e.g. Blender) In ...
1
vote
1answer
44 views

What is more efficient: Using matrix translation to move a character, or using a vector/scalar?

In 2D or 3D, matrix transformations are used for rotation, scaling, and sheering. However, when it comes to movement, should I go out of my way to use and implement scalar/vector movement, or just ...
-1
votes
1answer
434 views

How to compute matrix transform local/world on OpenGL

I'm developing an OpenGL program where each object / entity contains m_WorldPosition, m_WorldOrientation, m_WorldScale and m_WorldTransform (Vector3, Quaternion, Vector3 and Matrix4f). The problem is ...
-1
votes
1answer
55 views

How to pitch, yaw, roll, an object like a flight simulator in OpenGL?

I'm working on a college Graphics project using LWJGL (OpenGL in Java). I've done most of the scene but I got a problem in figuring out the jet's orientation. Here's how I tried it at the very ...
1
vote
1answer
44 views

Terminology for the way Transformation Matrix Data is treated

I recently asked a question at math stack exchange and realize a similar questions is more suited for this forum, but the original is here: ...
0
votes
0answers
87 views

OpenGL model transforms wrong on AMD GPU

I've been writing a program that uses OpenGL to display some simple 3D models (rays, cuboids, spheres and simple meshes). I am targeting the programmable pipeline in OpenGL 3.2. So far I have been ...
2
votes
1answer
68 views

Ball's velocity vector, reflect against a point

I need to calculate the new velocity vector when the ball collides with one of the paddle's corners. Let d be the velocity vector of the ball, r the target velocity vector and n the surface normal ...
5
votes
2answers
10k views

How to extract euler angles from transformation matrix?

I have a simple realisation of entity/component game engine. Transform component have methods to set local position, local rotation, global position and global rotation. If transform is being set new ...
1
vote
1answer
67 views

Display mesh in front of camera

Im trying to display a mesh in front of the camera and FACING the camera ( I'm developing an small editor in wpf using helix3d). Pretty much something like this question I load my mesh into a ...
-2
votes
2answers
668 views

Transformations are not correct using GLM and OpenGL

The aim of my program is to render a simple colored triangle in rotation. The rotations are correct if all Z values of my vertices are equals to 0.0f. If one of these values are different of 0.0f the ...
6
votes
2answers
3k views

How is the gimbal locked problem solved using accumulative matrix transformations

I am reading the online "Learning Modern 3D Graphics Programming" book by Jason L. McKesson As of now, I am up to the gimbal lock problem and how to solve it using quaternions. However right here, ...
0
votes
2answers
157 views

Using Unity's `transform.translate()` to translate relative to an object but only using two axis

I'm using transform.translate() to move an object around the world space, relative to the camera that is following it. The camera has an angle of 23 degrees on the X axis. The problem is that when I ...
1
vote
3answers
155 views

Cube goes through objects

I have Unity Pro 4.6.1 and I am trying to make a cube move with the arrow keys. Here are the barriers before I move the cube: And here's when I move the cube (the problem): I don't want the ...
1
vote
1answer
86 views

Transformation by right vector using TransformPoint return an identical position

I think the following code should work. I'm trying to set the position of a GameObject where the pointer currently is, I mean, where the player is looking currently: public void SetTransform ...
1
vote
1answer
59 views

Applying Transformation Matrices to VBOs in OpenGL

So I've recently tried to add Vertex Buffer Object Matrix transformation to an OpenGL engine I'm working on. I could go about this by applying the matrix to a copy of each vertex individually, but ...
3
votes
1answer
80 views

Make Camera Look at point using a World transformation matrix?

Variants of this question might have been asked on this site, but none of the answers I found worked in my case. I am trying to make a Camera look at a point. The camera has a world transformation ...
1
vote
0answers
26 views

SDL and smooth transition between changed movement direction

I have an object at position (x,x). Using SDL keyboard events every time the user presses one of the arrow keys the objects is to be translated (via a glTranslatef() call for the x and y axes) by a ...
4
votes
1answer
677 views

How to translate swipe gestures into rotations?

I am making a snake game. I want to rotate my snake in the direction specified by swiping on the screen, the directions are limited to orthogonals (90 degree increments). It's an android game. Can ...
7
votes
2answers
190 views

How do I create a draggable object which snaps to obstacles in the way?

I bring yet-another-drag-with-mouse question (I am using Unity with C#), but with a less common particular detail: the existence of obstacles in the middle of the way trough which dragging occurs (3D ...
6
votes
1answer
285 views

How can I convert OBJ data into CSS3D transformations?

I want to convert the data in a 3D .obj file (vertices, normals, faces) to CSS3D (width, height, rotateX,Y,Z and/or similar transforms). I found a bunch of formulae and what-not, but 3D isn't my ...
3
votes
3answers
556 views

Translating an object in the rotation direction

I am creating a graphical scene with OpenGL and SDL, and I'm running into a problem in regards to translating an object in its rotation direction. Each of the graphical objects in the scene has a ...
1
vote
1answer
83 views

Transform.forward having problems after rotation

I have this script, void Update () { float pitch, yaw, roll; pitch = Input.GetAxis ("Mouse Y"); yaw = Input.GetAxis ("Mouse X"); roll=Input.GetAxis ("Roll"); ...
1
vote
1answer
32 views

matrix transformations 2D - place in world-space but keep size in “object/screen-space”

I have a question concerning matrix transformations. I Think I know how it could be done, but Im not sure its the best/correct way to do it. I want to apply World translations and rotation to an ...
1
vote
1answer
91 views

What does glTranslatef function is translating in this code?

I understand translation from mathematics view where we can have a triangle with a certain coordinates. We can translate this triangle by multiplying the coordinates of the triangle (expressed in the ...
0
votes
2answers
286 views

ASSIMP transformation hierarchy and animations

I don't fully understand the transformation hierarchy used by ASSIMP. According to the docs (http://assimp.sourceforge.net/lib_html/structai_node.html) an aiNode's transformation is relative to its ...
2
votes
0answers
102 views

Shadow mapping - Can't get the right texture coordinates

I'm trying to implement shadow maps for Spotlight's, but alas I can't get them to work. I have verified that my fragment shader is getting the shadow map texture. I can sample from it in the ...
0
votes
1answer
138 views

Unity3d - Transform rotation(angle) help

Im trying to rotate an object 90 degrees to the left but instead of rotating straight left it rotates 270 degrees to the right. Here's the part of the code which controls the rotation: ...
0
votes
0answers
70 views

Translation & Rotation Transform Hierarchy

I've struggled to find a hierarchical transform class in C++ that is similar to that of Unity's (without scaling) that uses quaternions as opposed to matrices. So I figured creating my own wouldn't be ...
1
vote
1answer
29 views

Adjust postion only in X axis

I have two game objects named A and B, just as follows: I want to move object B to this virtual line without any rotation so that the destination is B' . What I have are transformation of object A ...
0
votes
1answer
91 views

Rotation in 3D space using Quaternion

System Configuration I have two simulation systems (which I am going to call Sim-A and Sim-B) where I am going to spawn an entity created in Sim-A inside Sim-B. Expected outcome The entity created ...
2
votes
1answer
208 views

How to move on iTween path when a button is clicked

I have set the iTween path and also I have added a button. When I click on the button the object should start moving along the iTween path.But issue I'm facing is when I run my project at initial ...
1
vote
1answer
67 views

Quaternion rotations & transforms from global to local space

I am trying to solve this problem and getting no where, could really use some assistance. Rotation is defined as X (rotate left/right), Y(rotate up/down), Z(roll) Coordinates are X: Forward/backward, ...
0
votes
1answer
46 views

glm Z coordinates are flipped

I am trying to render a 3D model using OpenGL. And for the projection and transformation matrices, I am using glm. I've got my model on the screen and it works just like I intended it to; except one ...
0
votes
0answers
19 views

Unity - Decrease/Increase the “Z axis” angle axis on Update()

What is the best way to Decrease/Increase an angle without using "eulerAngles"? I need turn my transform between 30 and 325, according to my "Y axis". If it is less than zero we reduce the value of ...
4
votes
1answer
142 views

Does converting quaternion to matrix cause a lot of overhead?

This is related to rendering creating a model, view, projection matrix for opengl. While matrix are fairly standard there's a lot of talk about using quaternions for rotations but why would u go from ...
2
votes
1answer
110 views

LibGDX viewport touch coordinates transformation

I've been trying to get LibGDX's viewport and camera unproject() to work and so far none of the tutorials/answers I've found have worked for me. I have a game window of 840x480 units with ...
-1
votes
1answer
140 views

Does Transform.childCount not work correctly?

This is my code: void OnTriggerEnter(Collider collide) { if (collide.gameObject.transform.tag == "Laser") { Debug.Log ("Inside If"); Transform resourceTransform = collide.transform; ...
0
votes
1answer
78 views

Transformation problems with hardware instancing in DirectX 11

I'm getting some wonky geometry in my application when trying to use instancing. I'm not sure if I'm doing the mapping of my per instance data wrong. This is how my mapping looks like: XMMATRIX scale ...
9
votes
2answers
907 views

Why do we need a fourth coordinate to divide by z?

I read the response here: What does the graphics card do with the fourth element of a vector as the final position? "The fourth component is a trick to keep track of perspective projection. ...
0
votes
0answers
23 views

What's the implication of right-handedness when building camera to world matrix?

I found these slides which go through the viewing transform in what I think is a easy way. However, I have hard time understanding two thigs: What would be the implication of using a right-hand ...