My problem is that I use love.physics with body etc.. for my character. But when I press the key to move the character...
Code: Select all
self.collision.body:applyForce(-400, 0)
Code: Select all
if love.keyboard.isDown("a") then
walk_left:update(dt)
self.collision.body:applyForce(-400, 0)
self.direction = "left"
self.move = "true"
elseif love.keyboard.isDown("d") then
walk_right:update(dt)
self.collision.body:applyForce(400, 0)
self.direction = "right"
self.move = "true"
else
self.move = "false"
end
With the .love