Code: Select all
playerxx = playerxx + (100 * (10 * pdt))
pdt = my var for delta time
As you can see, this code would indeed move the player right 100, but it also moves every pixel in between,
how can I get it to jump that 100 pixels?
Code: Select all
playerxx = playerxx + (100 * (10 * pdt))
Code: Select all
function love.keypressed(key)
if key=='right' then
playerxx=playerxx+100
end
end
Code: Select all
function love.update(dt)
timer=0
timer=timer+dt
if (timer>1) then
playerxx=playerxx+100
timer=0
end
end
Code: Select all
L
L Ö
Ö V
L Ö V E
Ö B E
V E
E Y
Users browsing this forum: Google [Bot], kov_serg and 3 guests