I used hardoncollider in my platfomer. issue appeared when the object moves fast and it will go through the walls. also when two shapes for example two rectangles collide with only one side as the attachment refers. hardoncollider will not test any collision.
so how can i fix this? please help me!
how to avoid collision missing in hardoncollider
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: how to avoid collision missing in hardoncollider
This works for me:
Can you upload a .love that shows the error?
Code: Select all
local HC = require 'HC'
function love.load()
r1 = HC.rectangle(200,100,300,150)
r2 = HC.rectangle(275,200,150,100)
end
function love.draw()
r1:draw()
r2:draw()
local collide, dx,dy = r1:collidesWith(r2)
love.graphics.print(("collide? %s, d = (%f,%f)"):format(collide, dx,dy), 10,10)
end
Re: how to avoid collision missing in hardoncollider
http://www.filedropper.com/main_14vrld wrote: Can you upload a .love that shows the error?
here is the .love file. containing the game that I am working on. the logic of player is in file cls/player.lua. I used 3 rectangles as aabb. and rule for collision is foot blocks foot; foot-- head no gravity. body for attack test. use wasd to walk, double press for run. space for jump and f for fight. you will see that only walking, there is no problem, but when running, if the next frames appears the situation that I mentioned, there generate no collision... so how can I fix it? thanks!
Who is online
Users browsing this forum: No registered users and 5 guests