Skip to main content

All Questions

Tagged with
0 votes
1 answer
595 views

OpenGL - 2D enemy not rotating to face player

I am creating a 2D game and at the moment I am trying to rotate my enemy so that it is always facing my player when my player moves. I am using the dot product to calculate the angle to then rotate ...
BinaryX's user avatar
  • 37
-3 votes
1 answer
426 views

Rotation on a newer version of OpenGL (How to rotate while not using glRotatef) [closed]

So I started working on a game with the new OpenGL versions in specific (3.2). I am using shaders and VBOs. How can I implement rotation? (I used to just use glRotatef) I would rather do it through ...
Amit Assaraf's user avatar
1 vote
1 answer
934 views

2d rotation on set of points causes skewing distortion

I'm writing an application in OpenGL (though I don't think this problem is related to that). I have some 2d point set data that I need to rotate. It later gets projected into 3d. I apply my rotation ...
Prismatic's user avatar
  • 3,348
0 votes
2 answers
307 views

2d rotation opengl

Here is the code I am using. #define ANGLETORADIANS 0.017453292519943295769236907684886f // PI / 180 #define RADIANSTOANGLE 57.295779513082320876798154814105f // 180 / PI rotation = rotation *...
Roy Heijmans's user avatar
5 votes
1 answer
24k views

OpenGL rotating a 2D texture

UPDATE See bottom for update. I've been looking alot around the internet and I have found a few tutorials that explain what I'm trying to achieve but I can't get it to work, either the tutorial is ...
Orujimaru's user avatar
  • 855
1 vote
1 answer
5k views

OpenGL rotation in 2D

I have a simple OpenGL application, which displays a line. I store x1, y1, x2 and y2 in global variables. The rotation function uses the feedback functionality, discussed here and the translation to ...
Mihai Rotaru's user avatar
  • 1,973