The circular movement of an object around a specific axis.
0
votes
0answers
46 views
X, Y, Z rotation around camera
I'm making a 3d orthogonal-projected, game using painters' algorithm in java.
I'm able to rotate the objects with incremental rotations (e.g. rotate all objects 10 degrees) using affine ...
2
votes
1answer
68 views
From 3d rotation, snap to nearest 90 directions
I have a 4x4 transformation matrix, made only from successive rotations and translations, and I'd like to "snap" my object to the "nearest" of the 24 orthogonal (multiples of 90 degree) rotations.
...
1
vote
1answer
78 views
How to rotate object not from it's center point but from it's another point?
I am new in unity and I am developing a game where I want to rotate my object I try this code for it.
if(Input.GetMouseButton(0)){
if(Input.GetMouseButtonDown(0)){
...
0
votes
0answers
15 views
How can I control the “speed” of a func_rotating object via Squirrel scripting in Portal 2?
I wish there was a better place to ask this, but I've ran out of ideas (after googling and finding nothing even close to what I'm looking for).
I basically have this rotating platform.
At the ...
0
votes
0answers
12 views
Reversed OpenGL ES 2.0 Rotation Code (Android)
My rotation code seems to be 'reversed' - I'll explain further...
In all the tutorials / examples I've seen online, there is something like this:
public void rotate(float centerX, float centerY, ...
0
votes
1answer
96 views
Unity 2D, C# - Make object move diagonally by a certain angle?
I have a sprite object which I want to move in 8 directions. Left, Right, Up, Down, Left top, Right top, Left down, Right down. The view is 2D with a isometric projection. The difficulties I am ...
0
votes
0answers
27 views
Camera rotation issue Libgdx
I have a OrthographicCamera and I want to rotate 90° it, but when I rotate it seems to be shifted more to the right.
Before rotation: http://postimg.org/image/tc9jpq9zr/
After ...
1
vote
1answer
46 views
Rotating a square rendered on a Bitmap
I'm writing a Software Renderer for fun/learning. Basically, it's just a giant array of integers which contain hexadecimal values (representing colour) that are rendered to the screen....
int ...
0
votes
2answers
116 views
Set new forward directions based on camera position
I have a 3rd person camera which can rotate around the player.
When I look at the back of the player and press forward, player goes forward. Then I rotate 360 around the player and "forward ...
1
vote
1answer
66 views
Box2D body rotation with setTransform
I' having a problem rotating a body with setTransform(), The body has multiple sensors that should rotate with the player. The rotation works but it rotates around the bodys local 0,0 position instead ...
0
votes
1answer
210 views
How can I make my player move in the direction the camera faces?
I have a 3rd person camera which can rotate around the player.
My problem is that wherever camera is facing, players forward is always the same direction.
For example when camera is facing the right ...
0
votes
4answers
95 views
Accurate sprite rotation with mouse movement
I am using the current mouse position to aim the player sprite, but I am not getting the best results.
It will often by off by a noticeable amount, or even a complete ~180 off if I go from one side, ...
0
votes
1answer
71 views
Simultaneously translating and rotating sprite in Unity
I have a 2D object (a PNG file I dragged onto the screen) which is a circle I would like to move left and right when the correct side of the screen is touched and have it rotate in the respective ...
1
vote
1answer
56 views
Gradually reduce speed
Basically I am working on following application of android version
Party Games: Drinking Wheel
For this I want to rotate wheel and want to stop wheel at specific point. But I want this with gradually ...
1
vote
2answers
111 views
What torque should I apply in Bullet to maintain a vertical orientation?
I have a RigidBody in Bullet. Each frame, I want to apply torque to correct its orientation toward an upright position (i.e. near-zero pitch and roll). I know its angular velocity and orientation.
...
2
votes
1answer
65 views
How can I trigger an event each time the rotation of my rigidbody2D is at a given value?
I would like to trigger an event each time my rigidbody2D is at a particular value.
The event should only be triggered once for each given value per complete object revolution.
Initial attempts at ...
0
votes
1answer
76 views
Rotating a vector around a vector in 3D space
I am trying to rotate a moon around a planet (the planet is also rotating around an axis) but I am having trouble doing so.
I tried to make the model move through space like so:
@Override
public ...
0
votes
2answers
110 views
Why do we say things are rotated around the z-axis in a space graph?
I've embarked on a journey of game development. I need to learn lots of 3D terminology, since I want to make 3D games. I learned that X is to the right, Y is up, and Z is towards you. Then why when a ...
1
vote
0answers
26 views
PhysX - Revolute joint around unit vector
I'm using a right-handed coordinate system with (0,0,-1) = forward, (1,0,0) = right and (0,1,0) = up. PhysX version is 3.3.0.
I have a unit vector which represents the axis around which my actor is ...
1
vote
1answer
26 views
Error in plane transformation
I have a bunch of coplanar points, who sit on plane P. I want to translate the plane to Q with the points upon. Here is what I do:
I take three points from P, say a, b, c. Their centroid is denoted ...
0
votes
1answer
51 views
Rotation with XMMatrix to Rotation with XMFLOAT3
I'm rotating a Direction Light around a fixed object, so the light only contains a XMFLOAT3 to determine it's direction that it is facing.
I have another object rotation using the variable Rotation ...
0
votes
1answer
42 views
Get 3D quad rotation matrix from points
I have 4 3D points which represent a even quad in space. (So 3 points are sufficient)
I need to get all the individual transformations (translation, rotation, dimensions) so that I can build that quad ...
2
votes
2answers
221 views
How can I simplify this code to compute the shortest rotation between two angles?
The following code will find the shortest rotation (in radians) (from pi to -pi) that I need to apply to from to leave me with to.
Scalar rotationBetween(Scalar from, Scalar to)
{
Scalar fromMod ...
1
vote
0answers
32 views
Unity 2D angular velocity center [duplicate]
I try to add angular velocity to my GameObject with this command:
rigidbody2D.angularVelocity = Random.value * tumble;
All works, but I want center of velocity be in the center of my rigidbody, but ...
1
vote
0answers
59 views
Three.js camera turning leftside right
In Three.js I am trying to implement an orbiting camera can be rotated around the x and the y axis. I am using these two functions:
function rotateX(rot) {
var x = camera.position.x,
...
0
votes
0answers
46 views
Camera movement in Super Hexagon
I do realize there is no camera in OpenGL ES 2, but from my understanding you can simulate one using view and projection matrices. I'm using Android, by the way. Here's a video of the game, in case ...
0
votes
1answer
72 views
3d rotation of a Gunner unit to shoot the target
I'm developing a scenario to shoot incoming targets by a specific gunner unit, however I'm confused to actual logic of shooting an object with a gun. I'm working in 3D environment.
I'v target's ...
2
votes
2answers
69 views
What are “local” and “global” rotations?
Each node in jME3 has local and global rotations, which can be expressed in quaternions.
What are they?
Documentation has no clues, about in which state rotations are zero?
0
votes
1answer
64 views
XNA 3D cube rotation problem
I am new to game programming and still trying to clear up my basics. I am stuck with a problem and unable to resolve on my own knowledge. I am trying to rotate a 3d cube in MonoGame (Similar to XNA) ...
0
votes
1answer
169 views
Libgdx Do a fixed rotation for orthographic camera
Im trying to rotate my orthographic camera in the render loop to a fixed angle, but I can only make the camera spin with the code I got:
in the create
OrthographicCamera camera = new ...
1
vote
2answers
82 views
Do I need to store a generic rotation point/radius for rotating around a point other than the origin for object transforms?
I'm having trouble implementing a non-origin point rotation. I have a class Transform that stores each component separately in three 3D vectors for position, scale, and rotation. This is fine for ...
1
vote
3answers
137 views
Rotation matrix for a 3D vector
I have a direction vector on which I have to apply some rotation to align it to positive z-axis.
To use Matrix.CreateRotationX(angle) of XNA, I need the angle for which I'd have to compute cos or tan ...
0
votes
1answer
101 views
Repelling a rigidbody in the direction an object is rotating
Working in Unity, I have a game object which I rotate each frame, like so:
void Update()
{
transform.Rotate(new Vector3(0, 1, 0) * speed * Time.deltaTime);
}
However, I'm running into problems ...
1
vote
1answer
192 views
libgdx rotation (animation, arrays) issues and help needed
well i am a noob at java and libgdx.
i got the homing bullet working with the help of someone.
now i am smashing my head as to how i can make it rotate so it faces the ball (which is the main ...
1
vote
2answers
78 views
what's wrong with my lookAt and move forward code?
so am still in the process of getting familiar with libGdx and one of the fun things i love to do is to make basics method for reusability on future projects, and for now am stacked on getting a ...
0
votes
0answers
25 views
How to rotate a trigger actor in UDK?
Working on a project and I need a trigger actor to detect a custom projectile type I've made. I would use a KActor with a TakeDamage event, but KActors despawn my projectiles. The issue is that I ...
4
votes
3answers
422 views
How to rotate a set of points on z = 0 plane in 3-D, preserving pairwise distances?
I have a set of points double n[] on the plane z = 0.
And I have another set of points double[] m on the plane ax + by + cz + d = 0.
Length of n is equal to length of m.
Also, euclidean distance ...
0
votes
0answers
48 views
Issue with turntable rotation openGL
I am trying to implement turn table like rotation in my openGL app.
In turn-table like rotation, z-axis is not supposed to roll. But in my app z-axis rolls like anything when I try to rotate the ...
0
votes
1answer
87 views
Can I have a fixed-angle sprite with a non-fixed-angle CircleCollider2D?
In Unity2D, can I have a fixed-angle sprite with a non-fixed-angle CircleCollider2D?
I would like to move my character using the circle physics (without fixed-angle), but display him always as if he ...
0
votes
2answers
81 views
How can I find the difference between rotations represented as angles in [0, 360]?
What is the easiest way to find the difference between two 2D rotations/directions?
I want to test if one rotation is within 10° of another. I would just subtract, but there are some problems ...
1
vote
1answer
426 views
LibGdx sprite rotation vs Box2D physics rotation problem
LibGdx sprite rotation vs Box2D physics rotation problem
Tearing my hair out on this one. I am an experienced software developer, but very new to LibGdx and Box2D development.
I am writing a game ...
0
votes
0answers
25 views
Why the rotation matrix of X(θ1)Y(θ2)Z(θ3) can be viewed as extrinsic rotation of order ZYX and intrinsic order of XYZ?
As title, from wiki and OpenGL red book(7e) I found the expression v' = R_x * R_y * R_z * v can be viewed as
Rotate vector v about local x axis, and y axis, finally z axis.
Rotate vector v about ...
0
votes
1answer
68 views
Incomplete mesh using DrawIndexedPrimitives after rotating mesh
Through help on this site I was able to draw the triangles of an unrotated, nonscaled nontransformed mesh created in Blender and exported to OBJ, accurately imported through Assimp and rendered in XNA ...
1
vote
1answer
137 views
Bullets won't shoot out of barrel in top-down shooter
So I am working on a top down shoot and have been stumped on why my bullets refuse to come out of the barrel of the gun. I know about the rotation equation which is
x2 = x * cos(theta) - y * ...
1
vote
0answers
103 views
Unity crashes completely when I rotate my objects [closed]
I've started my first tiny Unity project and after 20 minutes I run into a brick wall. My goal was to create a Android 2D game with falling polygons, that you have to click and they disappear.
...
3
votes
3answers
193 views
How do I disassemble a 3x3 transformation matrix into rotation and scaling matrices?
I have a transformation matrix that rotates and scales. Is there any easy way to disassemble it into the original rotation and scaling matrices?
For instance:
M = R * S;
// I need f and h such that
...
2
votes
1answer
100 views
Unity - Quaternion - Rotate / Unrotate Error
I'm trying to unrotate a quaternion, aligning it with the axis, and then rotate it back to where it was originally.
But with every iteration it seems to lose precision and just after 20 iterations the ...
1
vote
2answers
226 views
Matrix rotation wrong orientation LibGDX
I'm having a problem with matrix rotation in libgdx. I rotate it using the method matrix.rotate(Vector3 axis, float angle) but the rotation happens in the model orientation and I need it happens in ...
0
votes
1answer
84 views
Camera rotation around point, but without centering
Let's say i have the following:
Point somewhere in space
Camera with position and orientation (up, right, forward)
I want to rotate camera around the point, but also keep this point in same place ...
2
votes
0answers
102 views
Quaternion - rotating rigidBody to particular angle over time
Using Bullet Physics.
There's a rigid body that is rotated.
For some delta-time I need to rotate that body to have rotation of (0, y, 0) - keep the old y value rotation but reset x and z.
The ...