Hi !
Featured games (87)
games approved by the League of Dukes
Games in Showcase (669)
Games in Android Showcase (194)
games submitted by our members
Games in WIP (727)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Game Development / Newbie & Debugging Questions / Re: Y-axis acting differently from x-axis in libgdx on: 2013-02-11 08:05:18
So, I found this post.
I did the unproject thing and now it works! (not entirely sure what it does though)
2  Game Development / Newbie & Debugging Questions / Re: Y-axis acting differently from x-axis in libgdx on: 2013-01-28 18:44:03
Yes I could probably simplify it a bit. The reason I added * 1f was because I needed it to be a float but I should probably just use (float) haha. The reason I divide by height and width is because the coordinates are between 0 and 1. 0 is one end of the screen and 1 is the other. I calculate the coordinates of the object and then I divide it to get the coordinate that the system wants. But I think this is all irrelevant, since the code for the x and y-axes are identical except for x and width being replaced by y and height. The x-axis works perfectly so by my logic the y-axis should work perfectly too. But it won't Sad
    Diag is supposed to become sqrt(0.5) and when I printed it before it seemed to work. Although I'll test that once this problem is solved since now the speed when going up and down is different from going right to left so I can't really measure it properly.
    I'll try commenting out the orthographic camera but that was in the example program when I got it so I'd expect it to work.
    Edit: The only thing that happened when I removed the camera was that nothing appeared.
3  Game Development / Newbie & Debugging Questions / Y-axis acting differently from x-axis in libgdx on: 2013-01-28 08:18:30
First of all, hi, new here.

This doesn't have to do with different origins in the coordinate systems (afaik), I already accounted for that.
A previous post on the issue.
The code.
I'm using libgdx for this and it's just an icon that you can move either by using your arrow keys or by holding down your mouse button. The problem is that when I use setPosition() in both movement-ways the function seems to add/remove a couple of pixels. I have printed the position before setting it and once I set it it doesn't end up where it should be.
It's as if when I use setPosition() it multiplies the Y-value by 1.1-ish in both ways I implemented it. I don't have 1.1 (or any number like it) anywhere in the code and when I check the variable right before sending it to setPosition it is correct. Setting it to fullscreen didn't help.
Pages: [1]
IanParcs (34 views)
2016-04-18 14:18:53

KaiHH (34 views)
2016-04-18 08:35:41

KaiHH (66 views)
2016-04-15 12:43:58

theagentd (64 views)
2016-04-14 02:16:17

theagentd (71 views)
2016-04-14 02:15:43

IanParcs (64 views)
2016-04-12 03:51:16

IanParcs (35 views)
2016-04-12 03:50:03

IanParcs (32 views)
2016-04-12 03:49:54

IanParcs (27 views)
2016-04-12 03:49:52

IanParcs (36 views)
2016-04-12 03:49:52
List of Learning Resources
by SilverTiger
2016-02-05 09:39:47

List of Learning Resources
by SilverTiger
2016-02-05 09:38:38

List of Learning Resources
by SilverTiger
2016-02-05 09:35:50

Rendering resources
by Roquen
2015-11-13 14:37:59

Rendering resources
by Roquen
2015-11-13 14:36:58

Math: Resources
by Roquen
2015-10-22 07:46:10

Networking Resources
by Roquen
2015-10-16 07:12:30

Rendering resources
by Roquen
2015-10-15 07:40:48 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!