Tagged Questions
2
votes
1answer
109 views
Vector normalization gives very imprecise results
When I normalize vectors I receive very strange results. The lengths of the normalized vectors range from 1.0 to almost 1.5. The functions are all written by me, but I just can't find a mistake in my ...
1
vote
1answer
112 views
Calculate when round object is inside an ellipse
I want to calculate in java when a circle is inside an ellipse. I drew an example below:
For this particular problem, the top left corner of the field has the position 0.0f, 0.0f. The bottom right ...
3
votes
1answer
76 views
Convert global rotation into local rotation
I have an object in my game and I have its location, rotation and scaling in separate float[3]. The location rotation and scale are all on the global axis; these do not change based on the objects ...
-1
votes
1answer
69 views
Java moving image to where it is facing
I am trying to make an Asteroids type game.
I searched and tried everything to move an image along its angle (as radiant).
Using my knowledge of trigonometry I made the following calculation:
x += ...
2
votes
1answer
113 views
Transforms in Box2D
I'm attempting to implement a camera in my game. I had it working for regular objects, but I began using Box2D and obviously things changed a bit. I have a Body object that I want to draw at the ...
1
vote
1answer
100 views
Making Ball Fling in a Curve Direction
I was wondering how to figuring out how to slice a ball (banana kick) by flinging it curve-ways. However, according to the LibGDX's gesture listener, the method for flinging only focuses on a straight ...
0
votes
2answers
110 views
Is this Rotation Matrix correct?
I'm having heavly troubles with setting up a View Matrix and a Projection Matrix. It simply doesnt work. So I think my problem is related to my rotationMatrix function. I'm using this tutorial to ...
1
vote
2answers
91 views
How do I derive the angular movement for a craft
I have the regular (linear) motion implemented like this:
class Craft{
...
Vector location, velocity, acceleration, angularVelocity, angularAcceleration;
...
//the move class responsible for linear ...
4
votes
2answers
172 views
Inventory Grid Detection
I'm working on creating an inventory system for a game. The inventory system will use cells and 2D images to represent items, like Minecraft, Diablo, or WoW. I've hit a bit of a snag when trying to ...
0
votes
1answer
400 views
LibGDX Perspective Camera for 2D
I'm very new to LibGDX and I'm trying to use DecalBatch with PerspectiveCamera, simply to have z-coordinate for my sprites, as SpriteBatch does not offer that. However, I don't know how to calculate ...
11
votes
8answers
1k views
Converting a 2D curve into points for data storage
I’ve created an algorithm which converts any curve i.e. path into minimum number of points so that I can save it into a file or database.
The method is simple: it moves three points in equal steps ...
0
votes
1answer
355 views
Please help me with my 2D isometric tile picking [duplicate]
Possible Duplicate:
How to convert mouse coordinates to isometric indexes?
Okay, I apologise in advance if I make no sense here.
Basically, I've got a simple application that takes in a ...
4
votes
1answer
352 views
Drawing isometric walls
I'm having some trouble with isometric walls.
I'm drawing isometric floor tiles using the back to front rendering method, and it works fine. I also keep my floor tiles lined up properly in a nice ...
0
votes
1answer
92 views
Find the footprint of an isometric entity
I'm working on making a 2D isometric engine in Java. I'm getting into collision detection and I've hit a bit of a problem.
Characters in-game are not restricted to movement from tile to tile - they ...
5
votes
1answer
391 views
Isometric - precise screen coordinates to isometric
I'm trying to translate mouse coords to precise isometric coords (I can already find the tile the mouse is over, but I want it to be more precise). I've tried several different methods but I seem to ...