Rotation is the circular movement of an object around a specific axis.
-2
votes
0answers
39 views
Strange Rotation in OpenGL [on hold]
I seem to be having a problem with LWJGL rotations and Gimbal Lock. I don't understand why it isn't working, I've tried using Matrices, Euler Angles, Quaternions and simply GL11.glRotate But to no ...
0
votes
0answers
12 views
Tweening back from arbitrary 3D rotation in javascript
I'm using a 3D javascript library to rotate the vertex of a 3D object with a classic 3x3 matrix, to an arbitrary angle in the 3D space, as depicted in the image below.
For example, a first ...
1
vote
1answer
72 views
Quaternion rotation problems [duplicate]
I want to rotate my model and I have X and Y rotations. Here is my code:
D3DXQUATERNION q, qrotation;
D3DXQuaternionRotationAxis(&q, &D3DXVECTOR3(1.0f, 0.0f, 0.0f), ...
0
votes
0answers
19 views
Rotate sprite direction Cocos2d
I want that my sprite go always forward, and you can only control his direction moving right and left (on 360 degrees). I don't know why, but the movement it's senseless.
The constants to move and ...
0
votes
1answer
30 views
Rotation Continuity help
First the issue im having: Basically its the fact that the angles of a circle aren't continuous, they rise from 0 to 2pi then immediately fall back to 0.
I want to make a game where the player ...
0
votes
1answer
71 views
Earth and sun - How to make the sun revolve around the earth in the following code?
I want to imitate the planetary system with Earth and Sun drawn as solid spheres on the same window. I have drawn the two: the earth as the bigger sphere and the sun as the smaller sphere.
Now I want ...
0
votes
1answer
7 views
Strange Rotation in LWJGL
What I am trying to do is to create a Rubik's Cube game using LWJGL in Java. I have a lot of it done already, the only problem is the rotating. It just isn't working. I've tried multiple ways of ...
1
vote
3answers
42 views
Storing component vectors to avoid matrix and quaternion inaccuracies?
I read that I "should really be storing the component vectors (rotation, translation, scale) in addition to the quaternion and matrix forms." The reason for this is that, over time, compound numerical ...
3
votes
1answer
50 views
How to handle angles in an isometric game?
I am working on my first isometric game, and I am not sure how to go about angles and rotation. Basically, I want the player's forward movement and rotation to coincide with the isometric angles.
I ...
1
vote
0answers
78 views
How can I shoot an arrow if I know the shot power and target?
I am trying to shoot an arrow at a target with a 100% success rate. Given the initial force applied to the arrow, the gravity, the location of the archer, and the location of the target, how can I do ...
1
vote
2answers
30 views
Strange behavior with transformation matrix
I'm fairly new to transformation matrices. I'm using them to translate and rotate nodes and their child nodes. The following code works when applied once, but shows strange behavior when applied many ...
3
votes
1answer
50 views
Rotate sprite along the angle between two objects
Im trying to make flames follow my object, I set the direction for my moving object using the points between it and another object (using static destination for testing).
No matter what I do I ...
0
votes
0answers
30 views
Should I use animation or simple object rotation in this case
I'm making game where players control hover tanks using Unreal Engine 4.
Tank have a turret which rotates around for aiming. Turret pivot/center of mass is not exactly in joint with rest of tank so it ...
2
votes
1answer
57 views
How do I create a rocket projectile that is “dropped”, then accelerates toward the enemy?
I'm making an Asteroids-like game. I've successfully implemented linear bullets.
Now I want to add some rocket-styled bullets, with a certain flight path:
The rockets should be "dropped" back first, ...
0
votes
1answer
22 views
Unity Animated Player Character Rotation Glitch
I was wondering if anyone experienced this issue in Unity with Mecanim-animated characters ...
I have an animated player character with a third-person camera control (Game Camera from the asset ...
1
vote
1answer
48 views
Transform.forward having problems after rotation
I have this script,
void Update () {
float pitch, yaw, roll;
pitch = Input.GetAxis ("Mouse Y");
yaw = Input.GetAxis ("Mouse X");
roll=Input.GetAxis ("Roll");
...
0
votes
1answer
88 views
Help me understand this vbo/rotation, and how its done opengl c++
Im pretty new to opengl, and I just cant figure out how to rotate this vbo/vao in 2d space. This is how I bind my coordinates:
float points[] =
{
0.0f, 0.10f, 0.0f,
-0.10f, -0.10f, 0.0f,
...
4
votes
1answer
392 views
Tetris: 2D Rotation Matrix?
I'm creating a Tetris clone right now. I've got the tiles of tetromino stored as an std::array<tile, 4>. Each tile holds its (x,y) coordinates relative to the piece. For example, the t-block ...
2
votes
1answer
47 views
Euler adjustments between two quaternions
I have two quaternions, q1 and q2. If my object's current rotation is at q1, but I need to get it to q2, what would be the process to figure out how much rotation I apply to x, y, and z in order to ...
0
votes
0answers
14 views
Child object looktowards waypoint
hi guys how can I let my child character looktowards upcoming waypoint which can be on curve,slopes,hill.I have tried sevaral scripts but they are not giving proper rotation across all direction.Most ...
2
votes
0answers
27 views
Rotating kinematic object around a moving point Box2D
I'm new at Box2D and I am making a simple game where you control the rotation of the maze and the gravity leads the ball to the exit.
The game looks like:
The problem: I want to rotate the maze, ...
0
votes
1answer
55 views
How can I adjust steer angle based on speed in Unity?
I'm following this (https://www.youtube.com/watch?v=kAEpLX3rfms) video on how to make a car in Unity. But my car doesn't lower the steering angle based on the speed of the video. The idea was that you ...
2
votes
0answers
42 views
smoothly recenter view over time
I'm currently using the Google Cardboard SDK for Unity to build a fighter pilot simulator. What I'm currently trying to do is recenter the view(CardboardHead) smoothly over time when the user looks ...
1
vote
3answers
29 views
Libgdx RotateToAction does not directly rotate between 179 and -179
It took me a bit of debugging to realize why I'm having trouble with my rotations and it seems that rather than just moving the 2 degrees between 179 and -179, it prefers to rotate all the way in the ...
0
votes
1answer
34 views
In unity, how do I rotate a vector in relation to the player?
I am making a radar script in a unity FPS game project I am making for class. I already have a working example of a radar script that works in relation to the player's position. However the rotation ...
0
votes
1answer
60 views
Unity3d - Transform rotation(angle) help
Im trying to rotate an object 90 degrees to the left but instead of rotating straight left it rotates 270 degrees to the right.
Here's the part of the code which controls the rotation:
...
1
vote
1answer
33 views
Camera rotation according to target direction
I am facing issue when camera is following to my target and target rotates to 90 degree or -90 degree than camera is not rotating.i want smooth rotation according to target when target is change the ...
2
votes
1answer
67 views
Given a 3d goal point and a turn rate in radius, find max speed to reach goal
I'm working on a 3d space sim with AI agents flying ships through space. I am trying to get them to follow a waypoint path nicely, which involves figuring out how fast they can be travelling and still ...
1
vote
1answer
38 views
Rotation of rectangles offsets render position
I have an unknown number "Bricks" that must follow a straight, but not always level, path. Each brick is rotated around one central point properly to form a shape of intersecting paths. My problem ...
1
vote
0answers
32 views
Can I “Pre-rotate” VBOs while loading them in LWJGL?
It is possible to flip VBOs horizontally and vertically by swapping around destination coordinates.
Is it possible to rotate an image by any angle, such as 45 degrees, using different destination ...
0
votes
1answer
88 views
Rotate arrow without using Unity3d physics engine
I have this code that simulates the movement of a projectile without using the unity physics engine
IEnumerator LaunchProjectile(int angle, float speed)
{
// Move projectile to the position of ...
0
votes
0answers
40 views
Rotate Object inside room according to wall
I have a room. I am trying to move an object whenever it collides with a wall. It's working properly except at the edge of two meeting walls. At the edge it's flicking. I tried to move the object when ...
2
votes
1answer
19 views
Finding specific coordinates on a rotating line
I'm currently working on a mobile game which mainly consists of a rotating line and a ball. The line rotates 0.500 degrees clockwise around its center every frame. The ball is at first positioned in ...
2
votes
0answers
125 views
In UE4, how do I turn my character's body together with the camera?
I made a simple punch animation in Blender and exported it into Unreal Engine 4. In-game, the character appeared from a 3rd-person perspective, but I made it look like first-person by adjusting the ...
0
votes
1answer
66 views
Quaternion.LookRotation() not rotating 360 degrees
In my scene I have two cubes one has a tag "Respawn" and another one has the following script attached:
`
using UnityEngine;
using System.Collections;
public class NewBehaviourScript : ...
2
votes
1answer
212 views
calculating torque from angular momentum considering inertia moment
so I am trying to determine exactly how much torque to apply to a 3d model to make it rotate at a particular rate.
I apply force from the location of each engine on the craft so if one breaks the ...
1
vote
3answers
60 views
How much to roll Z to make horizon level
I've got a flying camera with some arbitrary rotation. (It also has a translation, but that's not important.) It's flying along its local Z axis, traveling in some direction over the ground with ...
3
votes
0answers
62 views
3D 3-axes rotation into 3D 2-axes rotation
Hello everyone and thanks in advance to anyone who'll help me through this !
I am currently working on the Kinect V2 (for XBox One) to interact with an avatar.
I'd like to use the rotation quaternion ...
0
votes
1answer
74 views
Rotating A 2D Cannon Based On Mouse Position [duplicate]
I'm creating a game like bubble shooter, I have a cannon which is in the image bellow:
I want to rotate the cannon based on mouse position.
So far I tried various solutions I found over the web but ...
0
votes
0answers
56 views
Faking Perspective/Depth using 3D images converted to 2D sprites - Can't work it out!
after a lot of searching/reading/viewing old school game videos I am still unable to work out how to achieve the effect I am after.
I am currently working on a 2D "overhead view" sci-fi RPG, using a ...
1
vote
0answers
17 views
Inverse kinematic joint limits
I want to limit the joint angle of my character.
I have just one issue i can't get the value of the joint limits of the human
-i search about max, min angle of each joint in x and y but i can't get ...
0
votes
1answer
18 views
How to use rigitbody2d.AddTorque() in JavaScript? (unity2D)
I just want to know how to use rigitbody2d.AddTorque() and an example script would be great :D. I am trying to rotate a cube forever using it as a test.
1
vote
3answers
265 views
Projectile Rotation During Flight (Tank Game)
I have a tank firing projectiles into the air.
I want the projectiles to be rotated relative to their position along their flight path.
See the diagram I drew in the image below.
At any given point ...
-1
votes
1answer
112 views
THREE.JS: why is the rotation only applied on the last axis used?
my function:
function rotateAroundWorldAxis2(object, radians1, radians2) {
object.rotWorldMatrix.makeRotationX(radians1).makeRotationZ(radians2);
// object.rotWorldMatrix;
...
1
vote
1answer
88 views
How to implement angled surface?
I'am trying to implement 2D platformer game inspired by N game. But the problem is I have no idea how to implement something like this:
I have two ideas of how this could be implemented but i ...
0
votes
0answers
45 views
Simulate a velocity sensor attached to a softbody node with bullet physics
I try to implement a virtual three-axis velocity sensor attached to a softbody node. The node already provides it's global position, normal and velocity, but how to calculate it's local velocity to ...
0
votes
1answer
103 views
XNA 2D rotation Matrix offset/origin
I'm currently struggling with finding the offset for my original camera translation after I have applied a rotation for it.
transform = Matrix.CreateScale(new Vector3(1, 0.75f, 1))
...
1
vote
1answer
39 views
Quaternion rotations & transforms from global to local space
I am trying to solve this problem and getting no where,
could really use some assistance.
Rotation is defined as X (rotate left/right), Y(rotate up/down), Z(roll)
Coordinates are X: Forward/backward, ...
2
votes
1answer
73 views
Unity 3D - Rotate towards object with random offsets
Title is a little confusing, but let me explain:
I want to make the enemies look at the player, and shoot at him, with random precision, meaning that one time the enemy will shoot a little bit to the ...
0
votes
1answer
129 views
FPS horizontal smooth camera rotation
I have a problem, my camera is parented to the FPS Controller prefab, then there is a script I wrote for the rotation of the player horizontally by mouse movement, it all works but the rotation is ...