Tagged Questions
1
vote
0answers
37 views
How to set object's / node's absolute rotation correctly?
Usually when I want to rotate an object/node in my Ogre scene I call the node's rotate() method. That rotates the node locally relative to it's current rotation. So for example, when I start with 0 ...
3
votes
1answer
48 views
How to map absolute Joystick position to object rotation?
In my (Ogre) 3d scene I have an object that should be rotated locally based on Joystick input. I have a Joystick with min/max values of [-32767, 32767] on both X and Y axes. When the Joystick is in ...
0
votes
1answer
78 views
Mouse Aiming Causing Rotation Jitter
When our game's ships move around, mouse aiming causes them to shake around a lot. The body being aimed is moved kinematically. I think we've narrowed it down to this block of mouse tracking code.
...
0
votes
0answers
62 views
creating arcball in cocos 3d [closed]
I am trying to make arc ball sample in cocos 3d , the code seems to be ok, but the rotation of ball is not as expected
it seems that i've done something stupid, but i can't figure it out. please check ...
0
votes
0answers
45 views
Understanding quaternions and axis angle representations [closed]
I have a sensor that gives me a quaternion. I convert the quaternion to an axis-angle representation using http://www.euclideanspace.com/maths/geometry/rotations/conversions/quaternionToAngle/. When I ...
1
vote
1answer
81 views
Moving an object toward another object on sphere knowing their quaternions
I have a sphere centered in world origin. On the sphere surface I have two objects and I know their quaternions (rotation around sphere).
Currently my movement works on Vector2 inputs (cannot change ...
0
votes
1answer
514 views
Rotating Objects in OpenGL: glRotate or Quaternions?
I'm coding my first engine and I'm trying to have performance in mind since I'll probably use it for mobiles, and I have this question, should you use glRotate or Quaternions for rotating objects in ...
7
votes
3answers
412 views
Routes on a sphere surface - Find geodesic?
I'm working with some friends on a browser based game where people can move on a 2D map. It's been almost 7 years and still people play this game so we are thinking of a way to give them something ...
1
vote
1answer
185 views
How to get a point to the left/right of a vector
I have a position vector of a point in space and a quaternion for it's rotation. What i'm trying to calculate is a point too the left and a point to the right.
I have the position and ...
8
votes
2answers
559 views
Arbitrary Rotation about a Sphere
I'm coding a mechanic which allows a user to move around the surface of a sphere. The position on the sphere is currently stored as theta and phi, where theta is the angle between the z-axis and the ...
3
votes
1answer
336 views
Convert rotation from Right handed System to left handed
I have Euler angles from a right handed system that I am trying to convert to a left handed system. All the information that I have read online says that to convert it simply multiply the axis and ...
2
votes
2answers
234 views
Rotating a child shape relative to its parent's orientation
When rotating a shape using a quaternion value I also wish rotate its child shape.
The parent and child shapes both start with different orientations but their relative orientations should always be ...
0
votes
1answer
235 views
(Quaternion based) Trouble moving foward based on model rotation
Using quaternions, I'm having trouble moving my model in its facing direction. Currently the model moves can move in all cardinal directions with no problems. The problem comes when I rotate the move ...
3
votes
2answers
296 views
How to derive euler angles from matrix or quaternion?
Currently working on steering behavior for my AI and just hit a little mathematical bump.
I'm in the process of writing an align function, which basically tries to match the agent's orientation with ...
1
vote
2answers
1k views
Rotation matrix derived from quaternion is opposite of expected direction
When I calculate a rotation matrix from a quaternion, it seems to be in the opposite direction. For instance:
For a rotation of +45 degrees about the Y-axis, I would expect to get the following ...
1
vote
3answers
218 views
Inverting matrix then decomposing gives different quaternion than decomposing then inverting the quat
I'm getting different signs when I convert a matrix to quaternion and invert that, versus when I invert a matrix and then get the quaternion from it:
Quaternion a = Quaternion.Invert(getRotation(m));
...
2
votes
1answer
300 views
Finding a suitable axis-angle to avoid gimbal lock
In OpenGL the camera faces the -z axis with the +y axis pointing up. I am using quaternions to represent the orientation of my objects (which works well) and am trying to do the same for the camera. I ...
3
votes
3answers
791 views
How to keep my Quaternion-using FPS camera from tilting and messing up?
I am using an FPS-like camera, and it uses quaternions. But, whenever I try looking up and then sideways, it tilts, and sometimes it can turn upside down. How can I fix this?
0
votes
1answer
215 views
Quaternion to axis-angle, or ripping apart a full transform matrix
My game entities currently hold a quaternion for their orientation with the ability to return either a 3X3 full rotation matrix (based on that quaternion), or a full 4X4 transform matrix. though what ...
7
votes
2answers
844 views
Calculating a quaternion so a bone points in a specified direction
In an attempt to solve this question, I decided to figure out the absolute (world space) directions of each joint in the source pose (as normalized unit vectors), and then rotate the joints of the ...
2
votes
1answer
694 views
Flip rotation matrix
I'm doing character control with kinect. I need to mirror the joint orientation because the character faces the player. Somehow by Googling through internet I've done it and everything works very ...
4
votes
1answer
424 views
Arcball Problems with UDK
I'm trying to re-create an arcball example from a Nehe, where an object can be rotated in a more realistic way while floating in the air (in my game the object is attached to the player at a distance ...
0
votes
1answer
327 views
Rotate an existing quaternion around an axis?
I have an existing quaternion (Java Quat4f). I would like to rotate this quaternion around an axis (i.e. 90 degrees around the x axis, 25 degrees around the y axis, 10 degrees around the z axis, 180 ...
0
votes
2answers
711 views
from normal to rotation matrix
(i'm on OPENGL)
i have a mesh O (object) and a mesh T (terrain).
i know a single triangle in T and i want to orient O to be aligned to that triangle (torate O to align to T in that point).
i have ...
9
votes
2answers
2k views
How can I rotate about an arbitrary point in 3D (instead of the origin)?
I have some models that I want to rotate using quaternions in the normal manner, except instead of rotation about the origin, I want it to be offset slightly. I know that you don't say, in 3d space, ...
2
votes
3answers
322 views
How should I model exact 90-degree rotations in 3D?
I'm familiar with quaternions... have used them in the past to model arbitrary rotations in 3D, as for a plane flying around with full pitch/yaw/roll freedom. Works great.
Now I'm working on a 3D ...
1
vote
2answers
1k views
How can I rotate a sphere in response to mouse movement?
I'm using jMonkeyEngine to develop a game. I'm good at scripting, but math usually goes over my head. I tried the Wiki page for Quaternion, but I was far too confused to figure this out myself :P
My ...
1
vote
3answers
439 views
Create quaternion based on where a unit is hit (shield effect as in Starcraft 2)
I'd like to implement a shield effect like that done for Protoss units in Starcraft 2. I'm guessing that the technique involved uses a partial sphere that is rotated to reflect where a unit is hit.
...
3
votes
2answers
571 views
Quaternion understanding
I have some understanding problem concerning quaternions.
In order to have my world object rotate in the correct way, I need to invert their quaternion rotation while refreshing the object world ...