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

learn more… | top users | synonyms (1)

0
votes
0answers
20 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
36 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
16 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
18 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
55 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
36 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
45 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
42 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
82 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
29 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
27 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
36 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
70 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
286 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
75 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
42 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
60 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
52 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
33 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
76 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
53 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
111 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
70 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
36 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
123 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
80 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
85 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
144 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
86 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
69 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
61 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
85 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
275 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
230 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
418 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
118 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 ...
1
vote
2answers
52 views

Translating Objects in Worldspace

Given the worldspace coordinates of a collection of arbitrarily positioned objects, how do I translate them while preserving their relative placement? For instance, I have a table and a few bowls that ...
0
votes
0answers
31 views

Connecting a model's joint to the joint of another model

I am trying to figure out the math behind orientating and translating a model so that a specified point on the model will connect with a specified point on another model. For example, given the ...
2
votes
3answers
115 views

Hero made of parts 2d rotation

I have a problem with rotation of my hero in 2D space. The hero is made of body parts such as: head, arms etc. Every part is a separate sprite. When I want to rotate the hero, I have to rotate all ...
0
votes
1answer
95 views

Transformations and basis vectors

I've been reading this very nice tutorial on OpenGL, and I encountered a statement which I can't wrap my head around. In Chapter 6, it states: Transformation from one space to another ultimately ...
0
votes
1answer
276 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
vote
1answer
172 views

How to constrain axis-angle rotation?

I have a problem where I'm performing an axis-angle rotation and am trying to constrain my rotations. Specifically I have a skeleton (model/mesh with rig, transforms are hierarchy parented to pelvis ...
0
votes
0answers
56 views

Translate click on screen to point on plane in 3D space

I am creating a 2.5D game with the camera at a slight angle, like so: The grid is the "playing field," and the positive x, y, and z directions are labelled. I already know all the details about ...
0
votes
0answers
65 views

Instantiating and deleting objects with triggers problem

I'm trying to create some kind of dust field, by now I'm just creating small balls for testing, between the bounds of a BoxCollider which I use as my dust field. When the box collider goes outside the ...
0
votes
0answers
299 views

In libgdx, how do I get the intersection of a ray with a model instance?

I am using LibGDX trying to use raypicking to pick a point on a Mesh. I have two methods for this that don't seem to work quite right: /** * @param ray * @param intersection The vector to store ...
0
votes
0answers
64 views

Relative Transformations for Bones

I'm using Blender to export my armatures in relative coordinates, and I'm trying to get to absolute coordinates in my engine. For the above example, the childBone's tip is an offset of [-1,0,0], ...
0
votes
1answer
132 views

OpenGL not rendering full scene, it is a mystery [closed]

I am trying to draw a scene in the sort of style of mock vector graphics. I've helped on a 2D game before with GLSL, but I tried to keep a simple approach to this project since I'm working by myself, ...