SFML community forums

Help => General => Topic started by: Mailman on September 15, 2016, 07:26:09 pm

Title: player stutters when moving.
Post by: Mailman on September 15, 2016, 07:26:09 pm
So I have my movement code working, but there is always a lag between when I press the button, and when the player starts walking. I have no idea why this happens. This isn't my biggest issue, it's just really confusing.
All my directions are the same, so I'm simply posting the minimal ammount of code I can.

EDIT: I solved my own problem. I only half wrote this code, and forgot to make my inputs Boolean. I COMPLETELY forgot to read the document I wrote to myself and ended up finding it in my google docs when I went to turn something into school.
(click to show/hide)

Where delta comes from:

(click to show/hide)