HardonCollider Issues with Tiles

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
Kingdaro
Party member
Posts: 395
Joined: Sun Jul 18, 2010 3:08 am

HardonCollider Issues with Tiles

Post by Kingdaro »

There are these weird issues I'm having using HardonCollider that I can't seem to fix. One is that you can climb walls if you're moving against them, and that if you're walking against a block that's only one block tall, you "climb" on top of the block rather than jumping high above it. This illustration should help with understanding what I mean.
uFS66.png
uFS66.png (5.32 KiB) Viewed 414 times
The player is the white box, and the blue path is what should be happening. The red path is what is currently happening.

Any idea on how to fix these issues?

EDIT: The controls for the game are just the arrow keys.
Attachments
game.love
(90.14 KiB) Downloaded 186 times
User avatar
xXxMoNkEyMaNxXx
Party member
Posts: 206
Joined: Thu Jan 10, 2013 6:16 am
Location: Canada

Re: HardonCollider Issues with Tiles

Post by xXxMoNkEyMaNxXx »

...Did you also notice that you can climb vertical walls?

Anyway, if you're using love.physics, there's probably a frictional force between the object and the character that is slowing the jump down, which makes sense.
User avatar
Kingdaro
Party member
Posts: 395
Joined: Sun Jul 18, 2010 3:08 am

Re: HardonCollider Issues with Tiles

Post by Kingdaro »

xXxMoNkEyMaNxXx wrote:...Did you also notice that you can climb vertical walls?
I mentioned that in my post.
xXxMoNkEyMaNxXx wrote: Anyway, if you're using love.physics, there's probably a frictional force between the object and the character that is slowing the jump down, which makes sense.
I'm not using love.physics, I'm using HardonCollider.
User avatar
xXxMoNkEyMaNxXx
Party member
Posts: 206
Joined: Thu Jan 10, 2013 6:16 am
Location: Canada

Re: HardonCollider Issues with Tiles

Post by xXxMoNkEyMaNxXx »

Ah... does it include frictional forces, because that's what I'm thinking is happening on the side of an obstacle. I think that the character is allowed a slight bit inside the wall and is standing on the tile below for the walls...

That's my feeling of what is happening, does any of it sound plausible?
User avatar
Kingdaro
Party member
Posts: 395
Joined: Sun Jul 18, 2010 3:08 am

Re: HardonCollider Issues with Tiles

Post by Kingdaro »

That's basically why the wall climbing is happening, yeah. I think the box climbing has something to do with the character's yvel.
benhumphreys
Prole
Posts: 31
Joined: Thu Sep 13, 2012 2:10 am

Re: HardonCollider Issues with Tiles

Post by benhumphreys »

I've had this same problem with HardonCollider before.

It's a little tricky to explain, but I think it's a combination of your player box's velocity and the resulting minimum translation vector (MTV).

In one timestep your character moving right, into a box, tries to move so it is within the box.
It's close to the top of the box, so when it moves into the box, the MTV for resolving the collision is actually up, to the top of the box, and not left, to where it came from.

As for how to resolve this, that's another issue.
User avatar
Kingdaro
Party member
Posts: 395
Joined: Sun Jul 18, 2010 3:08 am

Re: HardonCollider Issues with Tiles

Post by Kingdaro »

benhumphreys wrote:I've had this same problem with HardonCollider before.

It's a little tricky to explain, but I think it's a combination of your player box's velocity and the resulting minimum translation vector (MTV).

In one timestep your character moving right, into a box, tries to move so it is within the box.
It's close to the top of the box, so when it moves into the box, the MTV for resolving the collision is actually up, to the top of the box, and not left, to where it came from.

As for how to resolve this, that's another issue.
For the small box climbing issue, I was thinking that I'd just only set the velocity to 0 if the player is moving downward, but that didn't really work either.

Why does working with tiles have to be so difficult.
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests