Questions tagged [rotation]
Rotation is the circular movement of an object around a specific axis.
1,202 questions
0
votes
1
answer
145
views
Rotation and unique identification
My question relates to content rotation and data management of the emerging objects in a database.
I assume a networked game, with a server-client model. Unspecified objects in the game world are ...
0
votes
0
answers
113
views
How is 2.5D achieved with 3D Objects in a 2D scene?
I would like to make a 2d top down scene with 3d Objects. I could make a 3D scene and just tilt the camera 45 degrees on X and that would give me basically the same thing(I think). But I started with ...
1
vote
2
answers
166
views
How to make health bar or speech follow but not rotate with character container?
I have a top-down character object that is a Container of various parts.
This character can have elements that should move along with it (think a health bar, a speech bubble) that should NOT rotate ...
1
vote
1
answer
168
views
Understanding the math behind procedural aiming animation
I'm creating a procedural aiming animation system in UE5 as a learning experiment.
In order to position the hand for aiming down sights, I'm using a forward vector from player camera to project out a ...
1
vote
0
answers
41
views
Inertia tensor (rigid bodies) in body space vs. world space
I'm currently trying to better understand the concept of the inertia tensor in the context of rigid bodies, and I was hoping someone could help clarify a few points for me.
From what I've gathered so ...
0
votes
0
answers
38
views
How to Achieve the Same Object Rotation [duplicate]
How can I achieve the same object rotation as in this video? I can't figure out how this type of rotation is implemented. Where should I start looking? As far as I understand, after the rotation, the ...
0
votes
1
answer
129
views
How to Rotate a Sphere around a Tilted Axis in a 3D space
I'm developing a game with Unreal Engine 5.4.4.
In the game, I'm trying to rotate a sphere around its Z axis. If I put the sphere on the map and add a rotation around its Z axis is easy.
I only have ...
2
votes
0
answers
84
views
How to convert a quaternion to another coordinate system where y and z are inverted?
I have quaternion representing a camera pose in a coordinate space called "World Frame 2":
x+ = right
y+ = up
z+ = out
...and I want to convert it to another space called "World Frame ...
0
votes
0
answers
169
views
How to make an object rotate in local space then translate in world space using Raylib?
I'm trying to make a rubber duck move along the surface of a round 'world' - I should be able to rotate the duck on it's local Y axis and then move the duck forward, with the duck following the ...
0
votes
0
answers
83
views
Rotation Matrix rotating in context over another Rotation Matrix
I have 2 rotation matrixes than work in a world that have three dimensions (X, Y and Z) being Y the one of the height.
One of such rotations works using Y dimension, from the point of the center of ...
1
vote
0
answers
52
views
How to smoothly blend a 3D rotation which is exactly 180° in Unity?
I have a player capsule which I want to face the same cardinal direction as the key pressed. For example, pressing W will make the player face the camera's current ...
0
votes
1
answer
104
views
How to make movement relative to player rotation using Rigidbody.AddForce() in 3D Unity?
I'm making a 3D game and I was trying to make movement relative to player rotation for several hours, but I failed. Here's the code, maybe I made a mistake there. Also, player doesn't rotate.
...
0
votes
0
answers
31
views
When connecting a Character Controller component to a character, it starts to rotate uncontrollably
When connecting a Character Controller component to the character in Unity, it starts to rotate uncontrollably. Without the Character Controller, everything works fine, but the character does not walk....
0
votes
1
answer
200
views
How to use tweens to spin a wheel clockwise in Godot Engine?
How can I spin a roulette wheel in a clockwise direction using a tween?
I've successfully managed to rotate counter-clockwise to the exact segment, but changing the direction to go clockwise is still ...
0
votes
1
answer
102
views
LibGdx sprite isn't rotating correctly around its own axis
I'm currently trying to rotate a sprite around its own axis to make it "face" the mouse, but I'm having weird results. This is my code:
...
3
votes
6
answers
2k
views
How can I rotate a 16-bit signed integer vector?
I am trying to rotate a vector made of two signed 16-bit coordinates (-32768 to 32767). Using a LUT for sin/cos, I can use the standard method for rotating a vector:
...
0
votes
1
answer
47
views
Help with Ball Rotation and Attraction Mechanics in Leap on
I'm working on a Leap On-style game in Unity where the main mechanic involves a ball revolving around a central circle that constantly attracts the ball toward itself. The goal is for the player to ...
0
votes
1
answer
183
views
Rotate vector by quaternion different formulas
I was implementing the rotation of a 3D vector by a quaternion, implementing the formula that I've found in this thread.
To testing my function, I've rotated some vectors by using MATLAB, in ...
0
votes
1
answer
92
views
Rotate modelinstance node about its own centerpoint y axis in LiBGDX
I am trying to rotate the node of a modelinstance as follows:
Note: the node and modelinstance are rotating BUT not about their own center Y axis!
...
0
votes
1
answer
90
views
Help with player strafing rotation
Problem:
Player strafes in all directions fine but when rotated 180 degrees the opposite direction he can barely move in any direction.
...
0
votes
1
answer
543
views
Trouble getting the right Interp Speed with 'FInterp To' node
I was following this course using UE5 version 5.4.2 and building a "Handle Rotation" graph for a door that looks like this:
I encountered this problem:
setting the ...
1
vote
1
answer
190
views
How to rotate a 3d grid?
I have a spatial hashing grid that's mapped out like
...
0
votes
1
answer
104
views
Moving prefab body parts up and down — stops working when tied to a button click
I'm newbie to Unity and attempting to move a prefab's arm up and down on a button click but having some difficulty.
The arm movement works when called from the Update() method without checking for a ...
0
votes
1
answer
162
views
Adding 1 million torque to a normal cube won't make it rotate extremely fast?
In Unity, I have a normal cube with a rigidbody component. I'm listening to keyboard input and calling AddTorque with extremely high values when a key is pressed. ...
1
vote
0
answers
40
views
2 object snapping using bounding boxes in Unity Runtime
I am using boundary boxes for all calculations. In the image below you may see a case where this objects need to be snapped. Currently the calculations go as following, the rotation is changed by the ...
0
votes
1
answer
94
views
Weird behaviors with transform.LookRotation when looking at position+Vector3
I'm working on a character controller for an isometric retro shooter. However, when making the character rotate towards where they are moving, I encountered some issues.
The character doesn't fully ...
1
vote
0
answers
86
views
Quaternion.Euler acting weird
so I'm building up a simple arcade racing game and I was messing around with the Wheel Colliders setup. I was wondering if it was possible to add some camber adjustments in real time depending on the ...
0
votes
1
answer
170
views
Comparison of 2 different quaternion axes
I am trying to compare the Z-axis and the X-axis of two different quaternions in a way that would give me the Euler angles about the X and Y axes to line up the two different axes. In my program, the ...
1
vote
1
answer
72
views
Pan orthographic non-axis-aligned camera
I'm trying to create a panning control for a camera in bevy, but I can't seem to get the panning logic right when the camera is rotated. It works fine if the camera transform is directly facing the XY ...
0
votes
2
answers
262
views
Unity Navball x,y,z rotation axis' are not tracking main object
I am trying to figure out how to solve this issue. My navball is tracking the ship's rotation incorrectly as shown in the image. When the ship rolls (Z Axis) to the right, the navball rotates down on ...
1
vote
0
answers
117
views
How to calculate a direction vector from a 3x3 rotation matrix?
I have a dataset containing 2D images of telco towers and metadata. Each 2D image has 3x3 rotation matrix which provides orientation info about the drone when it captured the image.
Now I have a 3D ...
0
votes
1
answer
209
views
Camera rotation in TouchDesigner
I need help on something I'm struggling with very much.
I am working on a TouchDesigner patch where I have a Camera COMP with rotation on x, y and z axes. I need the formulas to convert such rotations ...
1
vote
1
answer
907
views
In Godot, how do I reposition the center of my mesh?
When importing a Unity package to Godot via Unidot importer, I noticed that a few imported models have their child rotations and transformations off-center from their expected points.
For example, ...
0
votes
0
answers
577
views
invert:condition "det==0" is true error with no obvious cause
For my project I am turning my CharacterBody3D 90 degrees on the x-axis towards a wall.
To achieve this I set basis.Z to the <...
0
votes
2
answers
750
views
Why are Quaternions better than Euler-Angles for Godot (when to use which)?
Sorry about the click-bait, I know there are many many reasons why Quaternions and Bases are better than using Euler-Angles. Anyone on a 5 second google search could easily know why!
But I am trying ...
0
votes
1
answer
105
views
Turret following the player in the opposite side
i have tried using lookout method then flipping it by 180 degress but it gives me the same result as the problem i had before.
my turret turns left when i move right and vica verse.
To fix this i used ...
0
votes
2
answers
180
views
How to rotate spaceship quaternion to face target direction with constant angular speed?
I have an enemy spaceship, and I want to make it turn to face the player with (for now) a constant angular speed. The ship's orientation is a quaternion. How do I do this?
Since this is totally free ...
0
votes
1
answer
159
views
Motion Retargeting from a BVH File to a Rigged Mesh in Unity with Arbitrary Rest Pose
I want to perform motion retargeting from a .bvh file (from lafan2 dataset) to a rigged mesh in Unity (which is John Lemon in this tutorial resource).
I have overcome most of the problems, but this ...
0
votes
1
answer
282
views
How to get difference in rotation between 2 objects, but only on one axis
Say I have 2 cubes that start with the same rotation. I wish to track the rotation difference between the 2 about the z (forward) axis. Such that if cube A remains stationary and cube B rotates 30 ...
0
votes
1
answer
73
views
Usage of 'World rotation quaternion'?
While debugging the code that decomposes the world matrix, I found that the decomposed world rotation value is different from the world rotation value stored in Transform.
Simply, World Rotation is ...
2
votes
0
answers
122
views
Calculate Up Vector of Object on Surface Given Points and Normals
Context
I want to find the up vector an object would have if it were leaning on a surface, given a large amount of points on that surface and their associated surface normals (i.e., an equation that ...
1
vote
0
answers
78
views
3D transform hierarchy rotation applied in wrong order
I'm following in the footsteps of this blog in implementing a transform hierarchy to my game engine scenes. I have a fairly similar implementation for a 3D transform:
...
0
votes
2
answers
93
views
Unity Camera snaps back to camera mouse look after lerping to a point and rotating normally. Once mouse look is re-enabled it overrides and snaps back
I am trying to get the camera to rotate towards a location and position. Which works at the moment, but once it is done and re enables the mouse look script or bool in the script the mouse look ...
0
votes
0
answers
71
views
Rotation inside MeshInstance3D surface plane
I'm trying to make a representation of a plane that rotates around a hole in a MeshInstance3D.
So far I've managed to make the circle's hole, but I can't make the ...
0
votes
0
answers
131
views
How to align to 2D ground surface directly underneath?
I'm out of ideas at this point.
I'm trying to set up a function inside my player controller that aligns the player with whatever is under it (usually the ground), ive tried using Raycasts, collisions ...
1
vote
2
answers
279
views
Calculate path segments size
I have a problem more closely described on a picture below.
The idea is that I have my agent in point A and I want to get to the point B. The problem is, that agents rotation towards point B is alpha ...
0
votes
1
answer
55
views
Sawblade's spin stops or jitters when swiping to steer it
I have a 3D object, a blade, that I want to rotate continuously
on the x axis, like it's cutting through something.
I also want the player to control its z-axis rotation by swiping.
It's mainly ...
0
votes
0
answers
62
views
Why do my trigger zones change rotation randomly on gameStart in editor?
I'm now doing a racer on rails like "Outrun". I do have a cool Script from internet that makes the camera and the player follow the Waypoints. The Waypoints are Trigger shapes. I have a ...
0
votes
0
answers
96
views
Unity clamping local rotation on LookAt issues
I'm new to game development, and I've been trying to code a "smooth camera" rotation that's limited within the camera's local rotation, using a smoothed cube and ...
0
votes
1
answer
137
views
Weapon flips upside down when aiming to the left
When the player turns to the left, the texture of the weapon turns upside down. How can I solve this?
Shooting Script
...