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

learn more… | top users | synonyms (1)

1
vote
1answer
23 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
49 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
25 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
53 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
31 views

Which of these two rotation methods are better

Since I've been game devving the method of rotation ive employed has been this: setOrigin(screenWidth/2, screenHeight/2) theta = getTheta() // Cycles through 0 - 360 in radians cP = vec2(0, 0) ...
0
votes
0answers
15 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 ...
1
vote
1answer
26 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
120 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
35 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
48 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 ...
8
votes
2answers
789 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
22 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
45 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
23 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
19 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
72 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
48 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
78 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
44 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
97 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
31 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
28 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
39 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
35 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 ...
1
vote
0answers
74 views

Transformed Vertices have wrong Z Axis

For quite some time I've been working on my open 3D game engine, to learn how this stuff works. You can see the full codebase relating to my problem here on GitHub. I'm using an OpenGL 3.3 Core ...
4
votes
1answer
291 views

Does vector transformation order matter?

Theoretical question - imagine a car object. There are two (or more) 'forces' acting on this car, these forces will affect where the car will steer. But the forces are calculated using car's location ...
2
votes
1answer
135 views

Proper normal vector transformations in normal mapping

Hello! This question is about transforming normal vectors from normal maps properly. I have tried methods from over five sources, still can't get it to work, and I'm really desperate. Included are ...
0
votes
0answers
48 views

In Java swing, while handling a 2D top down game, how should I handle scaling for quality transformations (mainly screen rotation)

For my top down game, I plan to have screen rotation where entities don't rotate, but everything else does. I am using a raster array to store my image so I don't have to render things stacked on each ...
0
votes
0answers
61 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 ...
0
votes
1answer
56 views

How to force a translation to go through an exact point?

I have a camera object with a script that will whether translate it with a set speed, or stop it. I also have 7 "checkpoints", where there are 7 different quads, who will stop the camera whenever the ...
2
votes
2answers
35 views

Rendering curved text in AndEngine

I'm trying to implement a small game using AndEngine and I have a question about the Text. More specifically, I'm wondering if it is possible to deform the text so that you can have a "curved" text or ...
0
votes
0answers
89 views

Java Slick2D rotating a Shape using transform(Transform.createRotateTransform())

I have spent most of the day trying to debug this tiny piece of code, and I can't for the life of me figure it out. I'm making a pong game for the Mini Ludum Dare currently going on. I am programming ...
0
votes
1answer
60 views

How can I rotate a Transform over a specified time in a single line of code? [duplicate]

How can I rotate a Transform over a specified time in a single line of code? I have had a lot of trouble with this in the past. I wrote a script which rotates a Transform by a specified rotation ...
1
vote
2answers
122 views

Making a cube slowly rotate 180 degress one time on a mouseclick

I am new to C# and new to Unity. I made a script that can turn a cube slowly one time after a mouse click but I feel like its probably wrong for using FixedUpdate. Is this OK or is there a better way? ...
0
votes
1answer
40 views

Flipped model has wrong triangle order

I have list of models and transform matrix for each of them. Some of models are flipped along X or Y or Z axis. This meshes will be rendered wrong, back face is rendered instead of front. I tried to ...
1
vote
0answers
89 views

parented/constrained object transform lags when moving character in unity3D

Hi I have a simple raycast-base gun that emits particles along it's path to fake bullets. Whenever I move the camera/character- the particles are misaligned, as well as anything else I try to modify ...
0
votes
1answer
42 views

Inline-Building a World (SRT) Matrix

Currently, to construct a world matrix, I have the following code: return FromScale(scale) * rotation.RotMatrix * FromTranslation(translation); However, this is constructing three matrices, and ...
1
vote
1answer
158 views

Problem with 2D matrix transform og shapes

I have set myself onto the task of creating a class BaseObject, which represents a graphics object with an associated shape as the member variable shape, which is a pointer an object Polygon. I'll ...
0
votes
0answers
17 views

How can I increase the horizontal speed of something every N seconds in Unity and make it STAY increased? [duplicate]

I have these particles that only move horizontally and to make the game harder I would like to increase the speed of these particles every 5 or so seconds. I am not sure how to do this I am still ...
0
votes
1answer
111 views

Organizing a Transform class to internally use quaternions

So, I'm interested in building a Transform class similar to the one used in Unity Engine, but in C++. My intent is for it to be user-friendly to change the position, rotation, and scale of a variable ...
2
votes
1answer
89 views

Why does the projection matrix transform object points into a unit cube in computer graphics?

This semester I both took a computer vision and a computer graphics seminar. But only now before the exams I realize that there seems to be a fundamental difference between projection in both topics. ...
3
votes
2answers
190 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 ...
0
votes
2answers
107 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
0answers
86 views

How do I create a view matrix directly from a quaternion and a position vector?

Given a quaternionic camera such that: typedef struct { vector3 upReference; vector3 rightReference; vector3 forwardReference; vector3 position; quaternion orientation; ...
1
vote
1answer
80 views

How to compute the forward, up and right vectors from a single quaternion?

Given a quaternion float x, y, z, w; How does one the forward, up and right vector from a single quaternion? vec3 up; vec3 forward; vec3 right; quat_get_all_axis(&quat, &up, &forward, ...
0
votes
0answers
99 views

Transformation order for augmented reality game using OpenCV and OpenGL

I'm trying to create a simple AR application where I'm augmenting the camera image of a Kinect with virtual objects that are tracked using an optical tracking system. The following picture ...
0
votes
0answers
308 views

OpenGL - Arcball camera rotation

I'm implementing arcball camera rotation, whereby a camera is looking at a coordinate and rotates around it in the x-axis or the y-axis such that the camera is circulating around it; the y-axis will ...
3
votes
1answer
251 views

Is it more efficient to transform vertices on the CPU or the GPU?

Working on optimizing the rendering core of my game engine and I have a couple of questions. Is it more efficient to transform vertices to world space on the CPU before you send then stream to the ...
0
votes
1answer
524 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 ...
3
votes
1answer
125 views

what is the very last element of a 4x4 transformation matrix for? [duplicate]

while its a similar value to its neighbour - Z translation (and I wont say if thats above or to the left for fear of sparking a religious war!) and it only seems to change when the Z translation value ...