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
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
54 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
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
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
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 ...
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
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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
69 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 ...
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, ...
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 ...
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
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 ...
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 ...
2
votes
1answer
109 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 ...
4
votes
1answer
141 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 ...
-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
76 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 ...
1
vote
1answer
69 views

Is the statement in Scratchapixel about transforming points correct?

I am reading this lesson from scratchapixel. To my understanding (and the example given in the same website) M is the matrix that transforms from local to world. Giong through the paragraph before ...
0
votes
0answers
27 views

Rotating a directional light about y axis (DirectX11)

I have 2 fixed objects in a scene and a directional light which I am rotating on each update but I am not sure if I am doing it correctly after looking at the results. Here is the code: rot += ...
0
votes
0answers
37 views

What is the convention for column-major order matrix transformations?

According to this cheat sheet for CG, if I want to use column-major order for my matrix/vector math I have to multiply from the left applying transformations from right to left, i.e. v' = P * V * v I ...
0
votes
1answer
300 views

Unity Transform.Position not returning expected position

So in my scene hierarchy, I have an object laid out like so; -Level1 --Level2 ---Level3 ----Level4 My script is attached to the Level1 object. When I try to find the transform.position of Level4 by ...
0
votes
1answer
116 views

Random Y Axis Movement Within Set Limits (C#)

I've searched everywhere for this answer but everything I find is in Javascript and a lot of it doesn't help/work in my situation since most of it is Vector3's and using each axis, and my game is 2D. ...
2
votes
1answer
428 views

Unity C# Object Scaling when parenting by script

How do I make it so an object doesn't scale with another object that I parented it with by script? If anyone knows how to get around this I would really appreciate it. This is the part of the script ...
2
votes
1answer
62 views

Separate rotation transform from parent

I have a hierarchy like this Body - Head - Arms Currently this works fine in that the Body's transformation is reacting as it should. Being children, the Head and Arms match the Body's ...
-1
votes
2answers
136 views

2D C# Collecting Item For Acceleration Unity

I have an issue regarding acceleration for Unity in C#, I'm trying to have my player collect an item and gain speed from it. Now, I have this working, but I need it to be a gradual acceleration, I ...
-1
votes
1answer
40 views

Bullet Physic: Stack transformations on body after adding

How can I stack multiple transformations on a body? I mean... Rotate, translate and then rotate again? If I understood, a transformation on a rigid body can be made like this: btTransform ...
0
votes
2answers
37 views

Getting unit to complete rotation before moving?

I've been trying to get a unit in my project to move in a fashion similiar to that of modern MOBA games. However, I am faced with the issue of the unit moving before the rotation is completed and the ...
1
vote
1answer
44 views

Rotate an objects velocity

I have a collision system (in 3D but for the purpose of the question assume 2D) where I want to calculate the new velocity (stored as a vector) after a collision. What I have is the velocity of the ...
0
votes
0answers
36 views

Coordinates estimation

Hi im using artoolkit to extract the coordinates of the marker im detecting with the camera. I need to know the values returned when arGetTransMat is the coordinates (x,y,z) which is returned ...