Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Rotation is the circular movement of an object around a specific axis.

0
votes
1answer
11 views

How to align 2 IMUs' quaternions?

Suppose I have 2 IMUs that output 2 quaternions. I place one IMU on my left hand and another one on my right hand. I put both my hands flat on the table and point it forward to the same direction. ...
0
votes
2answers
87 views

Is there any way to keep the applied torques in the old planes, even if the ship's local plane has rotated?

I'm trying to make a space shooter game in Unity3D with realistic spaceship physics. I have a problem with correct rotations. When I apply torque in global coords system it will always apply them in ...
0
votes
0answers
18 views

Trying to limit localrotation between 2 values

I'm trying to limit a pivoting arm attached to my player to only turn between, for example, a 90 angle forward in local space. At the moment I have a smooth rotating script that I am trying to add to ...
0
votes
1answer
47 views

How to change two rotation axes in Unity without affecting the third?

I have a GameObject in Unity and I need to change its X and Z rotation without doing anything with the Y, as that would mess up everything. Note that this sets the Y rotation to 0 and I don't want ...
0
votes
0answers
21 views

How to rotate bones in Unreal using ONLY C++?

I have a reference to a SkeletalMesh. As a test I'm able to move the mesh with the AddLocalTranslation, so I know I have the reference to the correct object. So I created a bone map with bone names as ...
0
votes
0answers
52 views

Combine rotation XZ (horizontal) with YZ (vertical). Math formula

I'm trying to make a rotation vertically and horizontally around a point at the same time but I'm not able to combine both. I have this formula for the horizontal rotation: ...
-2
votes
0answers
48 views

3D Rotation Help

I'm currently working on some rendering code for an engine and I need some pointers on what's going on with my rotation stuff. I can't seem to get it to work properly. Here's the current code. <...
-1
votes
0answers
30 views

Math for moving camera

I implemented camera look around with mouse, but it doesnt look 3d. This imgur shows what i mean better than i can describe it. https://imgur.com/a/gFb7kwX Right now i am using the DX and DY from ...
0
votes
1answer
20 views

Problems when rotating object to animate in Unity

I am trying to create some animations for a car model in Unity and I have a problem with the rotation of the wheels https://imgur.com/a/HcWxyob Here I can set the rotation properly as the pivot ...
0
votes
3answers
49 views

Creating orientation Quaternion from forward vector

Suppose that I have an orientation Quaternion Q, I can compute its forward vector from V = Q * Vector3.forward easily. ...
1
vote
0answers
19 views

Blender - Exporting and Replicating Bone Animation

I'm having trouble replicating Blender bone animation in my game. Bones that have a vertical rest position (Euler(PI / 2, 0, 0)) are animated correctly (e.g. head, neck, torso, legs, shins), however ...
0
votes
1answer
29 views

How to eliminate roll rotation?

Let's say I have Rotation(0, 0, 180) [pitch, yaw, roll]. How to do it that I would have Rotation(180, 180, 0) which is exactly the same?
0
votes
1answer
26 views

How do I rotate finger joints using controller input?

Suppose I have an index finger composed of 3 cubes which all contain Rigidbody which have isKinematic set to true. In a ...
0
votes
0answers
23 views

How do I apply rotations to parent child using Rigidbody? [duplicate]

I have a finger object. It is just three cubes representing the finger parts. The 2nd cube is the child of the 1st one. And the 3rd cube is the child of the 2nd one. This is the heirarchy: ...
0
votes
0answers
10 views

XNA Controls Rotation in Addition to Camera/Model

I'm relatively new to 3D programming and I'm trying to make a game where the player can control a character around a maze. My current problem isn't really getting the mouse to be centre and reading ...
0
votes
1answer
36 views

Can you decompose a rotation into a rotation around an axis and a quaternion?

I have a rotation represented by a quaternion and I want to get a rotation angle around the forward axis together with another quaternion which will together represent the original rotation. The ...
2
votes
3answers
89 views

Godot 3.0 Constant 2D Angular Velocity

I am making a Top-Down shooter in Godot 3.0 on Linux. I would like to have my character rotate to face the mouse-pointer at a constant speed, and have rotation speed power-ups that allow the player ...
0
votes
1answer
50 views

how to use glm::rotate with a eulerangle?

I have a vec3 to represent my object's orientation/rotation but the glm::rotate method expects a quaternion. If I just convert ...
0
votes
0answers
54 views

UE4 Blueprint Node Ordering, Vector Rotation and Child-Actor Communication woes

Right now, I'm trying to familiarize myself with UE4 by building a simple Tetris clone. I've hit a snag with the rotation of my tetrominoes. I'm working with three types of actors (Cube, TetrisLine ...
1
vote
1answer
79 views

How do Axis-Aligned Bounding Boxes update with rotations?

I have a bounding box class with a min (x,y,z) and max point (x,y,z). The object that is being rotated has a rotation matrix (3x3 matrix), but I don't know how to update the bounding box with ...
2
votes
1answer
105 views

Reconstruct Quaternion from 48 bit rotation data

I'm trying to reverse an animation file from a commercial multiplayer game, whose format was recently updated. The problem lies within joint rotation information, which changed from a 128bit format to ...
0
votes
3answers
57 views

How to Make Snaky Inchworm Motion With Armature Staying Upright

I have a series of connected bones in a straight line. I want to be able to rotate each bone vertically and/or horizontally so that it can slither and arch randomly kinda like a snake mixed with an ...
0
votes
1answer
11 views

Unity Rotations Not Following Local Nor Global Axis?

In the gif below, you can see that rotating on X moves all 3 axis including the X axis. It's possible it's rotating on the global X rather than local X (hard to tell). But Y looks more like it's ...
0
votes
1answer
54 views

Rotating 2D positions without rotating graphics

I am working on a basic 2D game from an overhead/fake isometric perspective. Arrow keys move the camera left/right/up/down. The trouble occurs when I tried to add rotation. I want the player to be ...
0
votes
1answer
57 views

Can I position a player avatar behind the camera based on rotation?

I'm currently reverse engineering a video game where what's rendered on the screen depends on the proximity of the player avatar to the camera. As such, for my freecam to work properly, I need to ...
0
votes
1answer
58 views

How can I use a redundant axis of rotation to prevent gimbal-lock & calculate a position for that axis?

I have a theodolite-like device that is trying to track a point such that it's "Forward" is always facing that point. Here is a GIF of it working as of now. As expected, when the value of the Red ...
0
votes
0answers
21 views

Rigid body dynamics : how to check if result is physically correct

I implemented rigid body dynamics according to this guide. And it kind of works. However I'm not entirely sure if the dynamics is correct when angular momentum is not collinear with axis of inertia ...
0
votes
1answer
79 views

OpenGL vector rotation matrix to a given point

I have a sphere with a radius of .5 The sphere is centred at 0,0,0 I am now trying to place items around my sphere based on a given x,y,z on the surface of the sphere. My items have been draw/...
2
votes
2answers
62 views

Unity c#: How to slow down rotation over time?

I am making a space combat game, in which the player can press q and e to roll their ship. I did this by adding torque to the rigid body when the player press q or e. However, after they do so, they ...
0
votes
1answer
113 views

GLFW - Camera rotation system

I need to make a camera rotation system similar to the one here http://madebyevan.com/webgl-path-tracing/ To rotate, press the Left mouse button and drag. So far I figured a basic idea of how this ...
2
votes
1answer
98 views

Unity move Vector3 position with transform

How can I move a new Vector3 position with a Transform? Like the transform is the parent the vector. Example if I want to push the x position for example by 10 value and I rotate the transform its ...
0
votes
1answer
71 views

Using PyOpenGL, can I rotate raw data rather than the current matrix?

I'm trying to create a sort of PyOpenGL renderer for the Bullet physics engine, and at the moment I'm rotating my basic cubes with math in Python. However, if I do the math in Python that's going to ...
0
votes
1answer
82 views

Unity 2D Tap to shoot at mouse position on android device

Hello everyone i am really stuck at the moment and would appreciate any help if possible. I have my game where i move the player up and down with 2 buttons on the bottom left of screenshot. I also ...
1
vote
1answer
74 views

Follow Player which moves over a sphere

After hours of googling and pulling several hairs out, I decided to open this thread. I want to make a game, in which the player walks around a sphere (like super Mario galaxy) and the camera should ...
1
vote
1answer
80 views

Why use gimbals?

With all the gimbal lock problems, quaternions, and stuff like that - why do we even use gimbals for rotation? Why not use local rotation instead of gimbals?
1
vote
1answer
37 views

How to rotate an object to a specific transform?

I am working on a car racing game and there are some times when the car rotates and ends up on its roof. On those situations I want the car to respawn on the same location. What can I do to rotate it ...
1
vote
2answers
32 views

Rotate A towards B with limited turn rate

I want to rotate A towards B with a fixed turn rate per second. My math skills are very limited and I have no clue in how to accomplish this. Best Regards
1
vote
1answer
46 views

How to Work With Arbitrarily Oriented Vectors

I'm brushing up for a pending game jam and just for kicks I thought I'd let the gravity in my 2D platformer push at an arbitrary angle. Normally gravity points downward (3 PI / 2), but if I wanted it ...
0
votes
0answers
31 views

How do you rotate a Unity gameobject with the device's gyroscope?

I currently have a gameobject placed atop a wedge as in the image below: I want to make the user have to rotate their device to keep the rectangle balanced upon the wedge. Here is the C# code I have ...
0
votes
0answers
18 views

Rotating Weapon with mouse.position even on UI Buttons how can i fix?

When i rotate my weapon using world space this works and looks great, but when i go on my android device and i am moving my player up and down with UI buttons my weapon rotates towards my UI Buttons ...
0
votes
1answer
32 views

Calculate quaternion rotations between two values

I have a quaternion Q1: X: -0.023995593190193176 Y: -0.4076451063156128 Z: 0.04357096180319786 W: 0.9117847681045532 and I have a keyframe value Q2 which is based on Q1: X: 0.176469 Y: -0.368251 Z:...
0
votes
1answer
42 views

2D top down 360 degrees rotational movement - stop instant rotation

I currently have a working, decently complicated, way of moving my player around. Using A & D you rotate the player and using W and D you increase forward or backward moving speed. This works ...
0
votes
1answer
89 views

How can you allow a sphere to rotate 360 degrees inside a hollow cylinder in Unity?

I have a hollow cylinder, within which is a sphere. The forward vector is predefined, so the user can not change their forward speed. What they do have control of, however, is the rotation of the ...
1
vote
0answers
25 views

Switch Vector 3 x,y,z Components Based on Rotation

I have a cube that moves by rotating on its edge. I want my code to also work for cuboids. The following code is what I'm using to rotate my cube: ...
2
votes
1answer
51 views

Why do I need to offset my aim rotation angle by 90 degrees?

I have this simple code to rotate an object (gun barrel) towards a target object (rocket ship). The gun barrel rotates towards the ship but is always 90 degrees off. I have fixed this in my code as ...
1
vote
1answer
241 views

Mouse look rotation not rotating object axis in Unity

So, I made a simple First Person Camera script for my game, and the way it's supposed to work is the camera is rotated by localEulerAngles to rotate the camera around, and then just the Y-axis ...
0
votes
0answers
55 views

Problem about simulating rigid body rotation with bullet physics engine

I want to simulate an object imposed by a torque T={1,1,1} with reference to the world frame. The mass of the object is 1Kg, and its diagonal elements of inertia tensor is {2, 1, 1}. However bullet2.7 ...
0
votes
0answers
13 views

(Houdini) Twist control for bones on curve using parallel transport algorithm (Rigging)

Hopefully you guys use Houdini and some math genius can help me. I have a curve where I used the parallel transport algorithm to transport the normal along the curve and then I use this curve as a ...
0
votes
1answer
43 views

Rotation doesn't turn towards characters on right

So I'm working on a tower defense type of game and I have a rotation set up that is supposed to follow a chosen enemy. What I'm seeing is when the enemy comes from the left the turret turns quickly to ...
-1
votes
1answer
29 views

How do i rotate my view on its own center

PROBLEM I am trying to translate and rotate my view, the translation works fine but when rotating the rotation is happening on the center of the world(0,0,0) instead of the view position. EXAMPLE ...