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

learn more… | top users | synonyms

0
votes
0answers
21 views

OpenGL camera Rotation Matrix & view Transformations

Recently i implemented a simple Opengl program that composes of a scene of objects, i've applied most of the transformation & projection matrices, in such away that i am able to rotate transform ...
1
vote
1answer
48 views

How to rotate vertices of 2D shape using a transform matrix?

I am making a top-down 2D game and am currently working on implementing improved collision using SAT. I programmed a Shape class with a Vector2 center that is its position in world space. On top of ...
1
vote
1answer
48 views

How can I make an attached gameobject behave correctly on character flip?

I have a character that on start-up is equipped with another gameobject/prefab as a weapon, attaching it to a hand. void Start() { handFront = transform.Find ...
1
vote
1answer
98 views

How can I translate a game object towards a position?

I am instantiating my game objects (spheres) through scripts. I want my spheres to move from one location to another. but I don't know how to do this. Update is called once per frame. Is that what I ...
2
votes
2answers
115 views

How can I determine the pixels covered by a transformed triangle (without drawing it)?

I have three points that form a triangle in a 3D scene. I want to apply an arbitrary rotation/translation transformation to this polygon and later check in which pixels of an image they would be ...
0
votes
0answers
57 views

Rasterizing euclidean planes

I'd like to visualize a BSP tree. To do this, I need to project an arbitrary euclidean plane onto a projection plane. I was thinking about calculating the intersections of the plane with the viewing ...
0
votes
2answers
281 views

How do I make a background fill the whole screen in Libgdx?

I'm using this code to set a 800x420 image to be full screen: public void show() { float w = Gdx.graphics.getWidth(); float h = Gdx.graphics.getHeight(); camera = new ...
0
votes
1answer
83 views

Build unity like Transform class [closed]

I am building a Unity-like Transform class. This is my header file: #include "Common.h" struct Transform { public: Transform(); void Translate(float x, float y, float z); ...
3
votes
1answer
42 views

How can I GL_SELECT from a gluPerspective-transformed scene?

I'm using JOGL to access OpenGL-methods on an old OpenGL version, because of school. I have written a method which is called before any objects are drawn. This method shows which object is picked. ...
0
votes
0answers
55 views

How to convert bones skeleton into joints skeleton?

I'm exploring skeletal animation and taking Half-Life SMD format as example. It has skeleton rigged as hierarchy of joints. Each joint has a parent and offset + rotation to it. Now I'm importing ...
0
votes
2answers
120 views

DirectX11: Drawing multiple objects

How can I draw many different objects on screen at once, with multiple vertex buffers, using DrawIndexed()? (Drawing the same object is simple, and I'm not looking to instance) ...but I am looking ...
0
votes
3answers
106 views

How can I properly rotate a 2D vector in the “flipped” XNA client space?

In my 2d XNA game, because SpriteBatch treats world space as client space and has positive Y axis down and negative up, I've built my game's world space with that coordinate system too. However, I've ...
0
votes
1answer
170 views

How to stop transform.position from being modified when adding child object in Unity

I suspect there is a well-known and easy to explain reason for the behavior I'm seeing, but I am having difficulty explaining it. (And likely not able to Google for the answer.) When adding a child ...
2
votes
2answers
181 views

Why translation uses multiplication and not addition? [closed]

To translate an object from (x, y, z) to (a + x, b + y, c + z) it's done using: OK, that's cool, but why would we multiply in the first place when we can add the two matrices directly as: ...
0
votes
2answers
127 views

Keep Mini map static after rotating / zooming with camera

Hi I am making a 2D game, where the Camera is able to rotate / zoom in or out on the camera focus (the player usually). However my game also contains a mini-map, and so far whenever I have to rotate ...
5
votes
1answer
205 views

Are there multiple valid definitions for what translate, rotate and scale do?

Are there multiple valid definitions for what translate, rotate and scale do to the 4x4 matrix? I bring up this question, because I have a simple webgl program that draws a square and does a few ...
1
vote
1answer
69 views

How to make child transforms honor parent origin

I'm working on a 2D transform system that has the following requirements: Transforms can have children Transforms have anchor points/origins that offset them Children should honor the parent's ...
0
votes
1answer
72 views

Displaying normals of a geometry

I have a rectangle which is created by 2 triangles and it is in x-z plane, and i have object on it. Now, the normals of two triangles (face normals) are y axis i.e. (0,1,0). I want to display normals ...
0
votes
1answer
521 views

rotating 3D object around the center

I have object moving from A to B on x-axis and there is no translation of object apart from it. Now, while moving, i want to rotate it around y-axis and the motion should change accordingly, i mean if ...
4
votes
2answers
177 views

Precision loss when transforming from cartesian to isometric

My goal is to display a tile map in isometric projection. This tile map has 25 tiles across and 25 tiles down. Each tile is 32x32. See below for how I'm accomplishing this. World Space World Space ...
0
votes
1answer
143 views

OpenGL camera translate and rotate on cameras local axis

How can I make rotation and translation on a local camera axis in OpenGL? I want to make camera like "aeroplane" camera with a pitch yaw and roll. I want to have good explanation on everything! Can ...
2
votes
1answer
369 views

The View-Matrix and Alternative Calculations

I'm working on a radiosity processor in DirectX 9. The process requires that the camera be placed at the center of a mesh face and a 'screenshot' be taken facing 5 different ...
2
votes
2answers
291 views

Split up a screen into regions

My task: I want to split up a screen into 3 regions for buffs-bar (with picked items), score-info and a game-map. It doesn't matter are regions intersect with each other or not. For example: I have ...
1
vote
1answer
63 views

Picking problem with rotated view matrix

I have picking code that works, if my view matrix has no rotation (only translation). Now If I rotate my camera, picking goes to hell. I cant find whats wrong My code: ...
2
votes
1answer
285 views

Rotate 2D Isometric World

Games like RollerCoaster Tycoon allow you to rotate the view at 90 degree intervals. I'm wondering how I could apply this to a game I'm making. I'm using MonoGame... but I'm wondering more if anyone ...
0
votes
1answer
81 views

Last Matrix operation ignored?

I have 2 methods, one to rotate my Quad and one to flip it (using scaleM), they are as follows: (Note, all values in these methods have been properly defined). If I call just one, they work as ...
0
votes
0answers
16 views

Constrain parent node transform to child bounds

If I have some node rendering tree set up, where a node basically has a draw method to render things, and a transform, represented as a 3x3 matrix, with scale and translation. Now, I would like to ...
1
vote
1answer
148 views

How can shears/reflections/enlargements be represented by 4x4 matrices? [closed]

I understand that 4x4 matrices can represent transformations on a 3d point (represented as x, y, z, w) Eg, a translation is [1 0 0 0] [0 1 0 0] [0 0 1 0] [x y z 1] where x, y and z are the amount ...
2
votes
1answer
206 views

Transforms in Box2D

I'm attempting to implement a camera in my game. I had it working for regular objects, but I began using Box2D and obviously things changed a bit. I have a Body object that I want to draw at the ...
1
vote
1answer
230 views

World to Pixel Transformation

My objects have a location in world coordinates (basically 1.0f is a meter). If I simply draw my objects using their world coordinates, each meter will correspond to a pixel. Obviously that's not what ...
3
votes
1answer
143 views

Shear transformation in the projection matrix?

I am trying to understand what the shear transformation (l+r/r-l & b+t/t-b) is actually doing in the projection matrix? The only thing I got till now is headache :) Can you please help?
0
votes
1answer
109 views

Common way to store model transformations

I ask myself what's the best way to store the transformations in a model class. What I came up with is to store the translation and scaling in a Vector3 and the rotation in a Matrix4. On each update ...
3
votes
1answer
164 views

Sfml: Sprite scale transformation animation

Is there any way to animate a transformation on sf::Sprite like setScale or setPosition? ie: sprite.setScale(0.5f,0.5f);. I want the transition between normal and half scale be smooth. Thanks!
1
vote
1answer
137 views

How to calculate the Screen Position of a bounding sphere/box?

Synopsis: What I have is an object rendered on the screen. I need to calculate the top-left / bottom-right of it's location on the screen in Screen Coordinates. Explanation: The object is ...
-1
votes
1answer
281 views

Android OpenGLES 2 ray picking, resulting coordinate jumpy in certain spots?

I am trying to implement object picking based on touch coordinates via an intersecting ray test. I am having trouble finding information on converting the touch coordinates to the coordinate system ...
2
votes
2answers
406 views

Realtime fisheye to cubic or spherical panorama transformations with OpenGL or pixelshaders

I'd like to transform a sequence of circular fisheye-images to cubic or spherical panorama images to be used in a panorama-viewer based on OpenGL. The viewer-part is nemas problemas but the transform ...
0
votes
1answer
117 views

XNA Camera Positioning All Wrong

I've been working in 3DSMax for years now and decided to give XNA 4.0 a try. I've got the majority of it working, however the camera is being a pain to me and I can't discern what's gone wrong. I ...
2
votes
1answer
137 views

Translating Viewmatrix is inverted, why?

So I've defined a Projectionmatrix, Viewmatrix and a Modelmatrix using OpenGL (LWJGL). But when I translate my Viewmatrix to +X it moves my object to the right (hence my camera is moving to the ...
0
votes
2answers
97 views

Transform translation relative to world space

What is common algorithm for translating a transform matrix relative to world space axis? E.g. Matrix M is representing some local space. When I want to translate M relative to it's own local axis, I ...
-1
votes
1answer
124 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 ...
1
vote
1answer
61 views

changing coordinate system

I'm currently trying to transform a system by scaling it on x and y axis and have some uncertainty. I have the general concept that scaling works as such: My original box has corners at (0, 0) and ...
2
votes
1answer
113 views

transformations of matrices

I'm in the process of reading up on 3d matrices and trying to following this powerpoint and had a few questions as to how to exactly determine the type of transformation from a matrix. If I have a ...
0
votes
1answer
599 views

Interpolating a player between two 2D points?

I would like a player to be able to move in a direction smoothly, whilst sticking to a fixed grid. Much like in Pokemon, how the player can move, but when the key is pressed and released quickly, they ...
1
vote
1answer
271 views

Canvas isometric translations to integer coordinates

I'm creating a canvas based game with an isometric playing board. I use the following transformations to get my square tiles to render on the screen: 'applyViewportTransformation' : function() { ...
2
votes
1answer
3k 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
143 views

Proper approach to handle transformation matrix and extract its components

Basically I have a Transformation component object with following structure(pseudo): TransformComponent{ Vec3 position; Vec3 rotation; //in euler angles Vec3 scale; Mat4 worldMatrix; ...
0
votes
1answer
73 views

How to change Vectors due to change in it's dependent Base Vector?

PLOT : I have been developing a game where the player falls down on Y axis and the camera is a Top-Down view camera. The camera, player (main character in the game) movements etc. have all been ...
3
votes
2answers
214 views

Calculating transform of arrow model pointing at some point in 3D space

I'm working on a 3D flight game and I'd like to implement a simple "navigation arrow" pointing at the next waypoint in world which the player has to fly to. I have position of both airplane (=camera) ...
0
votes
1answer
510 views

Rotation of Rectangle along Y-axis transformed to parallelogram

After the rotation of a rectangular view along the Y-axis, about its center, transformed into parallelogram, how do I get the rotated parallelogram coordinates? By Y-axis, I mean perpendicular to the ...
2
votes
1answer
368 views

How can I create a 2D camera with upscaling and translation?

I've computed a Viewport that is fair in size (a proper aspect ratio to the given device) and then I calculate my ScaleMatrix like so: scaleMatrix = Matrix.CreateScale( (float) ...