Search found 2 matches

by Tongshenrong
Mon Feb 03, 2014 11:38 am
Forum: Support and Development
Topic: Problem in Collision Detection
Replies: 3
Views: 1236

Re: Problem in Collision Detection

Thanks for the code,
But my real problem is i can't solve the response of the collision in my mind. I can detect the collision but i don't know how to write that(u wrote)...
Whats the logic of this?
(sry for my bad english)
by Tongshenrong
Mon Feb 03, 2014 9:22 am
Forum: Support and Development
Topic: Problem in Collision Detection
Replies: 3
Views: 1236

Problem in Collision Detection

function love.load() --player player = {} player.x = 50 player.y = 50 player.radius = 20 player.speed = 150 -- enemy enemy = {} enemy.x = love.graphics.getWidth()/2 enemy.y = love.graphics.getHeight()/2 enemy.radius = 20 end function love.update(dt) -- collision veriables player_radius = player.rad...