Hey there. I’m actually dealing with some physic issues, and I would like to set the size of one tile with a float to define my physic clearly. As example, we’ll say that one tile is equivalent to one unit. So, in the code, I have :
private float tilesize = 1f;
Great. Now, I’ll set my physic values :
private static final float ACCELERATION = 15f;
private static final float GRAVITY = -20f;
private static final float MAX_JUMP_SPEED = 7f;
private static final float DAMP = 0.90f;
private static final float MAX_VEL = 4f;
private static final float MAX_FALL_SPEED = 4f;
Simply. But here’s the problem, how can I set my tiles with whatever-size as a 1f thing for my program ?
Yes I use my Tiles Maps in LibGDX if this information can help, but, generally, I just want to know if there’s a some way to impose my float unit to a cell or a tile, to simplify my calculations and the location of my sprite. A known algorithm or even your own idea to solve the problem, something like that.
To ensure that the program considers a cell as being 1f.
I hope I’ve been clear this time, I’m pretty bad to express myself >.>
Heh, @LeuNoeleeste’s answer was automatically flagged as spam because he was apparently posting from the same IP address as @Kaybward. Anyway it should be unflagged now.