The circular movement of an object around a specific axis.
0
votes
0answers
30 views
iOS OpenGL ES 2.0 How to Billboard on Sphere and Rotate with Sphere
I have a sphere (earth) in OpenGL ES 2.0 for iOS. I also have markers that I want to place at lat/lons on the earth - but I want the markers to always face the user ( billboards ) but also move with ...
0
votes
0answers
31 views
creating arcball in cocos 3d
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 ...
-1
votes
0answers
28 views
Rotating body around a point Box2D Cocos2d
I have a problem when rotating a triangular image like a radar detecting enemies.
b2Body *body;
CCSprite *actor;
if (b->GetType() == b2_kinematicBody && myActor == [loader ...
4
votes
3answers
121 views
How do I make an arrow line up with a bow when rotating them?
I am trying to create a bow and arrow animation in which the player can drag downwards to increase the bow strength (see the image) and release it to hit a target. I can't get the arrow to align ...
-2
votes
0answers
23 views
Rotate object to face player touch [duplicate]
I need to make my sprite to face where the player have touched.
I tried like this:
public static double FaceObject(RectF position, RectF target)
{
return ...
0
votes
1answer
59 views
Sprite not rotating around its centre after Scaling at its centre
If I scale a sprite at its centre, then try to rotate it around its centre as well, the rotation does not occur around its centre.
If you need to rotate, for example a scaled ball,the way its working ...
2
votes
1answer
83 views
Rotation independent rotation
I came up with some cube rotating, but I could not make it smooth and easy to use because as the cube turned - the keys that handle the turning changed their purpose. Link to demo. The demo rotation ...
1
vote
1answer
62 views
Weapon as camera's child, rotation messed up
I put my weapon as a camera child, it works, but when i rotate my player it seems the weapon rotate a little too.
I'll attach some images so you can see it.
As you can see, when i look up i ...
1
vote
0answers
35 views
Libgdx sprite rotation (image quality)
This one is probably really simple but I didn't find a solution.
I'm trying to create a widget (speedometer) with libgdx.
For the arrows I'm using the setRotation() function.
But when the image is ...
-2
votes
0answers
43 views
2d Rotating Turret misbehaving when I target left side of screen [closed]
I have been fighting this for a while now. At its core the game is much like Missle Command on steroids, or will be if coding does not drive me crazy.
For right now I just need to get a turret on ...
-2
votes
0answers
109 views
FPS , Positioing gun [closed]
I am very happy to be with experienced game developers, so this is my code, the hands associated with the gun are not positioned in front of the camera!!! I tried out a lot of ways to figure it out ...
0
votes
0answers
39 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 ...
0
votes
2answers
103 views
How to I rotate a triangle by dragging the mouse in libGDX?
More specifically, I have rotation working in a way I don't like as follows:
//Draw the triangle using this draw method
//batch.draw(texture, x, y, ...
0
votes
2answers
80 views
How to rotate one object around another moving object in 3-d?
i was wondering if anyone could give me some advice on how to rotate one object around another moving object. After a bit of googling i found some code on another website that worked perfectly but it ...
0
votes
1answer
79 views
Love2D : Problem rotating image in a SpriteBatch
I'm working on a falling blocks type of game with triangular pieces. I'm using a SpriteBatch to accumulate and remember the pieces and their locations.
The problem is that when I rotate a scaled ...
2
votes
2answers
189 views
How to avoid gimbal lock
I am trying to write code with rotates an object.
I implemented it as:
Rotation about X-axis is given by the amount of change in y coordinates of a mouse and
Rotation about Y-axis is given by the ...
1
vote
3answers
134 views
First Person Shooter vertical mouse aim
I've just started writing a 3D First Person Shooter in Java, and I'm having a bit of trouble with tracking the mouse movements and moving the camera accordingly. I'm implementing typical FPS movement, ...
3
votes
3answers
165 views
Getting correct angles between Vector3s
I'm working on a project where you can draw lines between points. You select one point and drag the mouse onto another point and a line is drawn between them.
The line itself is a 3d object which is ...
5
votes
1answer
80 views
Rotating plane to be parallel to given normal via change of basis
I have two planes and their respective normals. I would like to rotate the second plane, planeB, so that it is parallel to the first, planeA.
To do this, I am using a change of basis to rotate each ...
-2
votes
1answer
119 views
Moving A Sprite In The Direction Its Facing XNA [duplicate]
There are many questions on this site that explain this except they seem to all be in Java.
I want to move a sprite in the direction it's facing, in XNA. I know you must use Radians and lots of ...
3
votes
1answer
90 views
Scaling and rotating texture onto another texture by raw buffer data
I've been messing with C++ AMP and OGRE in attempt to make writing to/altering textures to my liking easier on my behalf. In this I've been trying to draw a texture onto my "dynamic" texture with ...
1
vote
1answer
70 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
0answers
40 views
Proper matrix rotation and storing rotation values
I have GameObject's transform component(position+rotation) and shape mesh(array of vertices).
On each game tick I update coordinates of vertices relatively to game object's rotation.
And my current ...
0
votes
1answer
115 views
Rotation of Rectangle along Y-axis transformed to parallelogram
After the rotation of a rectangular view along the Y-axis, about its center, transformed into parallelogram, how do I get the rotated parallelogram coordinates?
By Y-axis, I mean perpendicular to the ...
3
votes
1answer
142 views
How rotate a 3D cube at its center XNA?
I try to rotate a 3D cube on itself from its center, not the edge.
Here is my code used.
public rotatemyCube()
{
...
Matrix newTransform = Matrix.CreateScale(scale) * ...
1
vote
5answers
261 views
how to rotate enemy to face player? [duplicate]
Okay so i havebeen rotating my enemy to face the player using
float targetrotation = Math.Atan2(playerpos-enemypos);
enemy.rotation = targetrotation; (<this line of code i want to change)
This ...
1
vote
2answers
169 views
Render rotated rectangle inside other rectangle bounds using Libgdx
I have this code to generate a red rectangle inside a grey rectangle:
new Rectangle(grey_rectangle_position_x, Game.SCREEN_HEIGHT/2-Rectangle.height/2,0);
This code makes the following:
Now, I ...
0
votes
0answers
35 views
save bones position after rotation un xna
i'm developping a game for solving a rubik's cube in xna framework c#
i want to know how to save bones positions after rotating them
i'm calling this method to draw bone witch construct the
...
0
votes
1answer
97 views
How do I apply 2 rotations about different points to a single primitive using OpenGL
I'm working on a 2D top-down shooter game that has a rotation feature like Realm Of The Mad God such that if you press e the camera rotates around the character in a clockwise direction and q rotates ...
1
vote
1answer
97 views
XNA Help - Slerping the KoolAid
I'm having some SLERP issues and was hoping one of you guys' could help me with your expertise...
(The following code is the Update method of a component whose responsibility is to rotates it's actor ...