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.

2
votes
3answers
44 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
22 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
36 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
42 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
97 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
56 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
7 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
40 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
45 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
53 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
36 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/...
1
vote
1answer
39 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
50 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
92 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
40 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
54 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
61 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
76 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
44 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
21 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
17 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
29 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
34 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
64 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
45 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
88 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
33 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
12 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
40 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
27 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 ...
0
votes
0answers
168 views

Make Camera smoothly orbit around my object with mouse/touch input but with limit on z-axis

I am making kind of a showroom where when I drag with mouse/touch, I want my camera to smoothly rotate (kind of orbit) around my main game object. What I have done so far is, that I have my camera ...
0
votes
0answers
18 views

How to handle rotation of props being spawned along spline mesh in Unity

I have a spline editor that creates a mesh along it with a given width, kinda like a road. I am trying to repeatedly spawn a model along the mesh. The position is correct, but the rotation is off. The ...
0
votes
1answer
23 views

How to orient a layer to connect 2 points AND facing the camera

here is my question, which I hope will be in general interest: If you have got 2 Points in 3D space and want a plane to connect those, you can quite easily use a function similar to "lookAt" to ...
0
votes
1answer
73 views

Can't set object's local rotation like rotating from gizmo in the scene

Here, I have a plane model with some sub parts(like aileron) can rotate: That red section is weight painted(rigged) vertices, and I need to control the rotation of this in Unity by script. So this ...
0
votes
2answers
39 views

How to rotate object just like in the scene?

Look at this image, I selected an object and pivot is set to local: When I rotated selected object in the scene by X axis, it rotates exactly I wanted. But if I rotate axis from inspector or script, ...
2
votes
1answer
94 views

Unity: Particle System start rotation completely incorrect when set via C# script

I am trying to set the starting rotation of a particle system via c# script so that the particles orientate with another object in the scene. My particle system 3d rotation is set as follows: ...
0
votes
1answer
33 views

How do I get a delay in motion to happen? (Unity)

I want the cockpits rotation to lag behind that of the cameras, so I wrote this code: ...
0
votes
1answer
319 views

Converting a quaternion in a right to left handed coordinate system

I have a quaternion from an IMU that id like to represent in unity. The issue is that the sensor uses a right handed coordinate system while unity uses a left handed coordinate system. In order to ...
0
votes
2answers
44 views

How to make UI Button to rotate an gameobject?

I'm trying to make a button to make a gameobject rotate and stay rotating in its own axis (Y) but I cannot make it work... As far as I know it's very simple: Create an empty gameobject (or whatever ...
0
votes
0answers
11 views

Problem with trying to replicate my custom mouse rotation to all the clients

Greeting everyone! I'm working on multiplayer FPS project with some custom mechanics for which i need custom mouse function. Problem is, mouse cam rotation works only on clients, but not on server, ...
4
votes
1answer
163 views

How to randomly rotate a D20 Dice in Unity?

I'm working on a Dice Application in Unity that involves randomly rotating a dice model on instantiation and then dropping it. But in order for this application to be useful I need to guarantee that ...
3
votes
1answer
80 views

Why does this work? - camera rotation from screen space

I do not understand the math behind the linked function or why it works. I would like to know this. https://sidvind.com/wiki/Yaw,_pitch,_roll_camera ...
0
votes
0answers
19 views

Unexpected Camera Rotation in Unity

I've been writing a custom third person controller and I almost have the camera working the way I want for basic movement. The problem I am having is that whenever I rotate the camera with the right ...
0
votes
0answers
54 views

How to make a rotation over time on an image

I'm trying to make a game where enemies are spaceships but I'm having problems with the ship's rotation. I'm using Javascript and PixiJs 4. This is an ugly gift that I tried to make taking some ...
0
votes
1answer
41 views

Setting position and look direction of a GameObject

I'm making a bendable game object comprised of a number of bones. The bones positions are calculated using some joints and some maths and that is all working as expected. But I am struggling to rotate ...
1
vote
1answer
55 views

Impulse resolution for purely rotational collisions (relative linear velocity = 0)

I've been writing a basic physics engine, (loosely) following Randy Gaul's online tutorial. I have been using this equation that he derives: $$j=\frac{-(1+e)((V^A-V^B)*t)}{\frac{1}{{mass}^A}+\frac{1}{...