Tagged Questions
4
votes
3answers
160 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
2answers
136 views
Grouping surfaces in pygame to get an object with two movement points
I would like to create a simple tank using pygame. One would drive the tank by controlling he velocities of two caterpillar tracks. They should be the two single movement points of the vehicle.
I'm ...
1
vote
1answer
249 views
How to make a stack stable? Need help for an explicit resting contact scheme (2-dimensional)
Previously, I struggle with the sequential impulse-based method I developed. Thanks to jedediah referring me to this paper, I managed to rebuild the codes and implement the simultaneous impulse based ...
1
vote
2answers
440 views
Rotating 2D Object
Well I am trying to learn openGL and want to make a triangle move one unit (0.1) everytime I press one of the keyboard arrows. However i want the triangle to turn first pointing the direction where i ...
1
vote
2answers
321 views
Rotating multiple points at once in 2D
I currently have an editor that creates shapes out of (X, Y) coordinates and then triangulate that to make up a shape of those points.
What will I have to do to rotate all of those points ...
4
votes
1answer
1k views
How do I rotate a sprite so that it is 'pointing' in the direction it is moving
I have a sprite, e.g a missile, heading in a certain direction (using a velocity vector).
How do I figure out its how much to rotate it so that it gets drawn 'pointing' in the direction it is ...
-5
votes
1answer
118 views
is object facing another object or facing it in opposite direction?
In 2d, in degrees, negative degrees possible.
What I want is to rotate the player to face the same direction as the door before opening it, but when I'll do the same again now from the opposite side, ...
0
votes
1answer
343 views
Joystick example problem for android 2D
I've searched all over the web for an answer to this, and there are simular topics but nothing works for me, and I have no Idea why. I just want to move my sprite using a joystick, since I'm useless ...
0
votes
3answers
422 views
Rotating Sprite around Y-Axis (2D)
I'm going to be creating a game soon, and part of it involves spinning sprites. The sprites will be spinning around the Y-Axis (imagine a spinning plate on top of a stick, where the stick stands up ...
1
vote
2answers
562 views
Matrix rotation of a rectangle to “face” a given point in 2d
Suppose you have a rectangle centered at point (0, 0) and now I want to rotate it such that it is facing the point (100, 100), how would I do this purely with matrix math?
To give some more specifics ...
2
votes
2answers
416 views
Passing an objects rotation down through its children
In my topdown 2d game you have a player with a sword, like an old Zelda game.
The sword is a seperate entity, and its collision box "rotates" around the player like an orbit, but always follows the ...
1
vote
3answers
1k views
Can I use SpriteBatch when drawing sprites on a rotating 3D plane
I'd like to have my plane of sprites rotate similarly as in this game (YouTube Video). So basically, everything is drawn in 2D, but the 2D plane is then "rotated in 3D" (or camera is rotated). When ...
1
vote
1answer
1k views
Rotation of images in Slick2D
I have have a rotation problem in the Slick2d library, the image is just not rotating (ie I set a rotation but no result is shown). Here is the rotation code:
if (input.IsKeyDown(Input.KEY_LEFT)) {
...
3
votes
4answers
626 views
Is it better to track rotation with a vector or a float?
In XNA, you can see that to draw a rotated sprite with SpriteBatch, you'll need a float describing the angle in radians.
I'm used to making games in OpenGL. I just want a rapid prototyping ...
2
votes
2answers
556 views
How can I make a sprite move in the direction it's facing using radians?
I am using PGELua for the PlaystationPortable. I would just like to know how to make a 2D sprite move in the direction that the sprite is facing.
When the sprite is blitted to the screen it should ...
4
votes
2answers
529 views
I need help with 2D collision response (of stacking rotating polygons, with friction and gravity, for a game)
Hi I am looking for suggestions on how to write a collision response for game programming purpose (so not a scientific simulation). I am dealing with 2D polygons that are rotating, and I want them to ...
19
votes
2answers
1k views
Calculating the rotational force of a 2D sprite
I am wondering if someone has an elegant way of calculating the following scenario.
I have an object of (n) number of squares, random shapes, but we will pretend they are all rectangles.
We are ...
2
votes
1answer
509 views
Rotating a group of sprites - How to calculate origin
I am rotating a group of sprites in XNA, which I developed with the help of the following example: http://msdn.microsoft.com/en-us/library/bb194912%28v=xnagamestudio.10%29.aspx
It all works very ...
6
votes
2answers
1k views
How do I rotate a structure of hexagonal tiles on a hexagonal grid?
My 2D isometric game uses a hexagonal grid map. In reference to the image below, how do I rotate the light blue hexagon structures by 60 degrees around the pink hexagons?
EDIT:
Main hex is (0,0). ...