Tagged Questions
0
votes
2answers
105 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, ...
1
vote
3answers
135 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, ...
1
vote
2answers
172 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
110 views
Fling and Spin an Object with Touch
For making a bottle to spin, I focused first on the touch dragging via input processor interface. It's a bit unresponsive since when I rotate clockwise or counter-clockwise as long as my finger ...
2
votes
1answer
192 views
Rotating 3d plane to XY plane
I have a triangle in 3d space and would like to create a grid over the triangle, such as in the image below.
The purpose of this is to store information about each block of the grid. In order to ...
2
votes
0answers
62 views
Pitch (X-axis) rotation problem [closed]
Situation:
From a first person perspective (camera position) I want to be able to grab an object and have it fixed to the center center of the screen while looking up-down (pitch) and looking ...
2
votes
0answers
155 views
Rotation of viewplatform in Java3D
I have just started with Java3D programming. I thought I had built up some basic intuition about how the scene graph works, but something that should work, does not work.
I made a simple program for ...
1
vote
1answer
177 views
Rotating a cube using jBullet collisions
How would one go about rotating/flipping a cube with the physics of jBullet?
Here is my Draw method for my cube object:
public void Draw() {
// center point posX, posY, posZ
float ...
0
votes
1answer
538 views
rotate sprite and shooting bullets from the end of a cannon [duplicate]
Possible Duplicate:
How to Align Gun with Bullets
Hi all i have a problem in my Andengine code,
I need , when I touch the screen, shoot a bullet from the cannon (in the same direction of ...
2
votes
3answers
304 views
OpenGL Get Rotated X and Y of quad
I am developing a game in 2D using LWJGL library.
So far I have a rotating box. I have done basic Rectangle collision, but it doesn't work for rotated rectangles.
Does OpenGL have a function that ...
1
vote
1answer
209 views
How to I get a rotated sprite to move left or right?
Using Java/Slick 2D, I'm using the mouse to rotate a sprite on the screen and the directional keys (in this case, WASD) to move the spite. Forwards and backwards is easy, just position += ...
0
votes
2answers
306 views
Can't get sprite to rotate correctly? [closed]
I'm attempting to play with graphics using Java/Slick 2d. I'm trying to get my sprite to rotate to wherever the mouse is on the screen and then move accordingly. I figured the best way to do this was ...
4
votes
2answers
1k views
Move sprite in the direction it is facing?
I'm using Java/Slick 2D. I'm trying to use the mouse to rotate the sprite and the arrow keys to move the sprite. I can get the sprite to rotate no problem, but I cannot get it to move in the direction ...
5
votes
3answers
470 views
How can I make a character move forward in a certain direction?
I have an entity class which is updated every game tick. Let's just assume said entity moves forward constantly. What i want to know is, how can i make it so that i can give an angle to a function and ...
1
vote
1answer
695 views
Vector movement in space type game (Mouse rotation)
I'm having an issue with my movement in my 'game' prototype. It's basically not working and admittedly my knowledge with vectors is lacking.
The issue I'm running into is that the ship won't move in ...