Original Post
I've been trying to implement a simple acceleration for a character you can control, but for the life of me I cannot quite grasp it. :/
I know the equation, acceleration = velocity/time, gravity = -9.8m/s^2 but how can you implement time?
for vertical movement
int playerY;
int playerYvelocity= gravity * time?
int gravity = -10;
public void update(){
playerY += playerYvelocity;
}
Hmmmmm. Hmmmmm.
I know the equation, acceleration = velocity/time, gravity = -9.8m/s^2 but how can you implement time?
for vertical movement
int playerY;
int playerYvelocity= gravity * time?
int gravity = -10;
public void update(){
playerY += playerYvelocity;
}
Hmmmmm. Hmmmmm.