Search found 2 matches

by Newmski
Fri Mar 31, 2023 10:03 am
Forum: General
Topic: HardonCollider - resolving collision with a rotated rectangle
Replies: 2
Views: 1870

Re: HardonCollider - resolving collision with a rotated rectangle

Thanks to your suggestion I have got a solution that works much better than before. This is a bit of a hack but it feels ok for now. for shape, delta in pairs(HC.collisions(player)) do player:move(delta.x, delta.y) if delta.y > 0.01 then player.velocity.y = 0 else player.velocity.y = player.gravity ...
by Newmski
Sat Mar 25, 2023 12:54 pm
Forum: General
Topic: HardonCollider - resolving collision with a rotated rectangle
Replies: 2
Views: 1870

HardonCollider - resolving collision with a rotated rectangle

Hi, I am attempting to integrate collision detection into my game using HardonCollider and I don’t think I am understanding how to correctly resolve the collisions. In the attached sample I have a player and a platform. Gravity is constantly applied to the player which makes it fall until it collide...