Questions tagged [transformation]

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

Filter by
Sorted by
Tagged with
1
vote
0answers
36 views

My arcball camera does a roll when it shouldnt be

I am trying to build an arcball camera and it's mostly working, the problem is that as you rotate around the object you have selected (orbit_target_pos in the code),...
4
votes
1answer
190 views

How to scale major and minor radius of a quarter torus

I am dealing with quarter tori as in the image below. My issue is that I need to be able to scale its major radius and minor radius separately using a scale matrix. However, when I use a regular ...
1
vote
2answers
36 views

Rotating Cannon's Mouth Toward Player

I am trying to make my cannon mouth rotate towards player, but the rotation is messed up and up I don't know how to fix it. ...
0
votes
0answers
14 views

How to align Blender animation to external mesh data?

I'm building a custom engine and I have a confusing asset pipeline. I have skeletal animations in Blender and voxel mesh data in Qubicle. My engine loads the skeletal data and applies joint ...
0
votes
2answers
78 views

In practice, is it better to store Euler angles or store three vectors represent as “front/right/up”?

I'm writing a game engine, and when it comes to the transform part, I just use the representation which unity/ue uses, that is: a vector for the position, a vector for Euler angles, and a vector for ...
0
votes
1answer
39 views

What is the signifigance of the Dot Product in World to Local Transformations?

Looking for help understanding why this World to Local Space function works. I'm working my way through Buckland's Programming Game AI By Example The following function is used in the book to convert ...
1
vote
1answer
39 views

Moving a GameObject to a position, waiting, and then moving it again

Hello hello :) Ive been attemping to move a platform (a door basically), and it has partually worked. What works so far is i can move an object from A to B and wait, however it will not move it ...
0
votes
1answer
77 views

Should 3D transformations be represented by a 4x4 matrix or a 3x4 matrix?

Since 3D transformations are represented by 4x4 homogeneous matrices we know that their last row is always (0,0,0,1), and as such the behavior of this final row is implied so long as we know whether ...
0
votes
0answers
10 views

Game Maker - Selecting tiles in an isometric grid

I have implemented an isometric grid with rotation in 2 directions in Game Maker. I did this by first calculating the points of the grid in 3D space and then converting them to 2D points through ...
0
votes
0answers
24 views

Projecting Coordinates from one Space into another, but with “twisting”

i'm trying to generate a decal mesh kinda like this: http://blog.wolfire.com/2009/06/how-to-project-decals/ but instead of projecting the decal with a box, i need to project it with a sort of ...
1
vote
1answer
30 views

Scaling a rotated child with parent-child transforms

In unity, if you parent something to another object, then give the child some rotation, and scale the parent, the scale applies to some arbitrary axis to the child, here's some pictures to demonstrate:...
0
votes
1answer
30 views

Static function is being called, but if statement within is not working

I am trying to make a game where upon the player stepping on a block, the block will change color. I am doing this by using transform.position with the player character being recognized as 1 above in ...
0
votes
0answers
23 views

Move gameObject in its facing direction

I have the following four gameObjects, they have, respectively, the rotations: -90, 0, 90, 180. I want them to move as denoted in the image below This is what I got so far: ...
0
votes
1answer
34 views

Mathf.Round returning wrong values

I want to check if the Y position is changing or not for the player and the enemy. If it has changed in the frame I want it to return true and if it didn't I want ...
0
votes
0answers
27 views

How to store 3D entity position, offset, and transformation data for parent and children?

I am looking for a cleaner pattern to storing character position data, offsets, and transformations. I currently have a character with a vec3 for position. ...
0
votes
0answers
56 views

How to prevent rendered wound from sliding on moving character?

I am trying to display a rendered wound on the character, but I still can't figure out how to display it properly without sliding on character's body. I'm following this link on rendering the wounds ...
0
votes
1answer
37 views

Making sense of the positions of gameObjects

Project files: https://github.com/Sebastian-Nielsen/makingSenseOfPositions Note: There are no scripts running, all I am doing in between each picture is manually changing the x-coordinate in the ...
0
votes
0answers
6 views

getting data from an array stored in a different script Unity [duplicate]

LandingScript w = GetComponent<LandingScript>(); foreach (Transform x in w.Waypoints) { allWaypoints[i] = x; i += 1; } i want ...
0
votes
1answer
55 views

2D engine design/architecture: transformations

Hello! I'm working on this hobby little 2D engine in JavaScript because I want to learn how all this things are implemented and architectured in general. Internet is full of resources but most things ...
1
vote
1answer
105 views

Raycast wrong direction

I use Physics.Raycast and transform.forward to shoot a ray in front of my gameobject, but the ray gets cast downwards instead. <...
1
vote
1answer
68 views

How to align a 3D object with four points?

I'm sure there's a better way to articulate this question, but I lack the vocabulary. Imagine a skateboard. As it rolls straight down a road, the "deck" is aligned with the road, just offset a few ...
0
votes
1answer
47 views

How to calculate the transformation such that two points with different position, orientation and origins line up?

Let's say you have two different 3D Objects which both contain a node that is off center (not at the origin) and have an orientation. How do you calculate the transform for one of the object so that ...
0
votes
1answer
64 views

Calculate Discrete Fourier Transform by using c#

There is a definition of Discrete Fourier Transform: I want to calculate amplitude and phase of a transformed sequence. I tried : ...
0
votes
0answers
16 views

Set parent by property

In the editor's hierarchy, if I drag and drop one object onto another, the second becomes the parent of the first, and moving the parent will cause the child to move. I see I can set this relationship ...
0
votes
1answer
39 views

Nested transform.position in Unity

The following code works so good , but it is so long. How can I use a for loop to write a short script for any number of prefabs? ...
3
votes
1answer
172 views

What does the Node2D transform property do?

Following a Godot tutorial I encountered the transform property, but I'm not sure what it means nor how to use it. I read the official Godot documentation, but it ...
0
votes
1answer
111 views

Creating object in front of player, with some distance

I want to create objects in front of player with some distance, so that prevents hit with player immediately. So first, I get the global player position and direction vector which player towards: <...
0
votes
1answer
33 views

After rotated by Z-axis, X/Y axis still rotating just like z is 0

I'm making aerial vehicle controller, which can rotate 3 axis: X(Pitch), Y(Yaw), Z(Roll). Rotating x(pitch) and y(yaw) axis works fine, however after I rotated z(Roll) axis, x/y rotation gave me ...
0
votes
0answers
124 views

Unwanted angular velocity in unrelated axis (rigidbody simulation)

so real quick I'm simulating 3D rigidbody dynamics. This is what I have: ...
0
votes
1answer
26 views

Changing node's translation affects to sibling node

I have a node which looks like this tree: FPSController (Root node, and it's KinematicBody) CollisionShape Camera GroundCheckRayCast When I moved CollisionShape's location down, camera also going ...
1
vote
1answer
128 views

Follow 3D Path Around Sphere

I have currently have a path that wraps around a Sphere from one side to another - this is basically a 3D highway in the sky type object that is a textured road. I have an Aircraft model that I can ...
2
votes
1answer
80 views

What are the “axes of a matrix” exactly?

I am currently learning about game engines, and for the engine math, there are functions called GetXAxis, GetYAxis, and GetZAxis that returned the X, Y and Z axes for a matrix. These functions return ...
1
vote
2answers
110 views

How can I find the offset rotation and position between two objects in 3D?

I have two objects in 3 dimensions, one of them (Child) is attached to the other one (Parent) using the offset between them (XYZ ...
1
vote
0answers
97 views

How to calculate rotations for an object with scaling transformations?

I am working on implementing scaling transformations into a game engine (C++), which previously assumed only translations and rotations. Visually, the scaling works, but a lot of the game logic ...
0
votes
1answer
30 views

Prevent Animation Tab from changing the position of an object

I am quite new to Unity. I am using the latest version. When I try to make a door open animation, it goes well with rotation. But when I add the position property it takes it to the ...
1
vote
1answer
89 views

What should the Z coordinate be after transformed by the projection matrix?

I'm working on an OpenGL 1.x implementation for the Sega Dreamcast. Because the Dreamcast didn't have any hardware T&L the entire vertex transformation pipeline has to be done in software. What ...
0
votes
1answer
95 views

Unity 3D rotating object around 2 axes rotates it around 3

I am developing a 3D space shooter and I've fount that when triying to rotate the ship using X and Y axes it also rotates on the Z axe. The answer here helped me a lot, but now when I try to rotate ...
3
votes
1answer
202 views

C++ Assimp - Transformation Hierarchy

I have a question regarding model imports using ASSIMP. I've been working on an Entity and Component (e.g. unity gameobject component) based game engine for fun and to learn in my spare time. I've ...
3
votes
2answers
98 views

Mimicking enemy boss movement of Wonderboy in Monster Land

I want to imitate the movement of the "Death" boss enemy in Wonderboy in Monster Land. At first, I thought it just moves with a sine wave, but it's not. The up and down movement is erratic. I ...
0
votes
2answers
37 views

How to access specific child indices (directly, not using tags or searches)?

I have a game object whose prefab is structured a very specific way. It is a conveyor belt. I intend to arrange them end-to-end and animate them all at once using a script. Right now I am trying to ...
0
votes
1answer
33 views

Bullet prefab gets stuck to target after hitting

As the title says, I am having an issue with prefabs: I am trying to make a bullet follow a curve and then hit a target using this method: ...
0
votes
1answer
111 views

How to create a custom set of coordinates based on two points in Unity?

As the title says, I am having problems finding a way to create a new set of local coordinates based on two points. Here is an example: Consider that the two gameObjects are not one parent of another,...
0
votes
1answer
54 views

Unity3d: Position a gameobject such that its forms a right angled triangle with other two gameobjects

How do I position C gameObject such that it forms a right angled triangle with A and B. I tried to use ...
0
votes
0answers
16 views

Performing translation after rotation on object

I'm working in Maya and I have a light object. When I rotate my light object on the origin my manipulator rotates with object. However, as soon as I translate the light object (no longer at origin), ...
0
votes
1answer
213 views

Quaternion.RotateTowards not working as expected when parent object moves/rotates

I have a Tank with a rigidbody. A Turret Base is attached to the Tank via a Hinge Joint. The below TurretController script is attached to the Turret Base in order ...
0
votes
1answer
22 views

GameObject keeps snapping to camera size on play

I'm in the process of making my GameObject move when I drag it across the screen using touch. But my current issue is when I press play to test the game, game object snaps to the size of my camera on ...
0
votes
0answers
37 views

How to implement Meshlab's rotation manipulator? [duplicate]

I want to implement a rotation handle/manipulator mechanism that would enable user to rotate a 3D model exactly like Meshlab does. Unfortunately I don't fully understand how does the rotation gizmo ...
0
votes
0answers
38 views

How to program 3D translate widget like in blender?

Im struggling to achieve the translation widget in my own render engine. Funny enough I thought that widgets are easy, but boy was I wrong... What I want to implement: Where I am having problems: ...
0
votes
0answers
27 views

Find mouse pos in 3D space?

I have a game where there is a set of tiles rotated 45° away from the camera. I want to work out what tile is being hovered over by the mouse, and for that I need to translate the mouse pos on the ...
1
vote
0answers
41 views

How can I get my player's character to slide along a rail?

I am creating a snowboarding game and would like my player to be able to jump on a rail and move along it if it lands on it. I have no idea how to approach this. I have already tried using ray casts ...

1
2 3 4 5
9