Code: Select all
if CheckCollision(player, enemy) == false then
enemy.x = enemy.x + (player.x - enemy.x) * (dt - 0.01)
enemy.y = enemy.y + (player.y - enemy.y) * (dt - 0.01)
end
I actually thought that the way It is currently would be okay, but it turns out it won't be great. So I'm wondering if there is a more efficient way to achieve this?
Thank's again guys.
A link to my current project can be found at the bottom of the first post in this thread:
http://love2d.org/forums/viewtopic.php?f=5&t=2098