Skip to main content
Title which more accurately and meaningfully represents what the question is asking.
Source Link

Collision detection when How to differentiate landing on top of an object from falling: two identical cases down the side?

I am looking for a conceptual solution to my problem. It's a simple platformer-alike game where player can move horizontally during free-fall.

Consider those two cases: enter image description here

In the first case, from game experience point of view, the player should land on top of the box; and in the other case he hit the left edge, hence the player should fall down.

However, from my code point of view ("real behaviour"), both those collision detection cases are identical. I am not sure how to separate them.

In both cases the vertical velocity is positive (falling down) and the user is moving with some fixed positive horizontal velocity. (moving right)

From a collision-standpoint the two cases are identical, I think. How can I tell whether I should put the player on top of it or let him fall?

Collision detection when falling: two identical cases?

I am looking for a conceptual solution to my problem. It's a simple platformer-alike game where player can move horizontally during free-fall.

Consider those two cases: enter image description here

In the first case, from game experience point of view, the player should land on top of the box; and in the other case he hit the left edge, hence the player should fall down.

However, from my code point of view ("real behaviour"), both those collision detection cases are identical. I am not sure how to separate them.

In both cases the vertical velocity is positive (falling down) and the user is moving with some fixed positive horizontal velocity. (moving right)

From a collision-standpoint the two cases are identical, I think. How can I tell whether I should put the player on top of it or let him fall?

How to differentiate landing on top of an object from falling down the side?

I am looking for a conceptual solution to my problem. It's a simple platformer-alike game where player can move horizontally during free-fall.

Consider those two cases:

In the first case, from game experience point of view, the player should land on top of the box; and in the other case he hit the left edge, hence the player should fall down.

However, from my code point of view ("real behaviour"), both those collision detection cases are identical. I am not sure how to separate them.

In both cases the vertical velocity is positive (falling down) and the user is moving with some fixed positive horizontal velocity. (moving right)

From a collision-standpoint the two cases are identical, I think. How can I tell whether I should put the player on top of it or let him fall?

Tweeted twitter.com/StackGameDev/status/1198436336082051072
Became Hot Network Question
added 12 characters in body
Source Link
weno
  • 541
  • 4
  • 10

I needam looking for a conceptual solution to my problem. It's a simple platformer-alike game where player can move horizontally during free-fall.

Consider those two cases: enter image description here

In onethe first case, from game experience point of view, the player should land on top of it,the box; and in the other case he did hit the left edge, so he's going tohence the player should fall down.

However, from my code point of view ("real behaviour"), both those collision detection cases are identical. I am not sure how to separate them.

In both cases the vertical velocity is positive (falling down) and the user is moving with some fixed positive horizontal velocity. (moving right)

From a collision-standpoint the two cases are identical, I think. How can I tell whether I should put the player on top of it or let him fall?

I need conceptual solution to my problem. It's a simple platformer-alike game where player can move horizontally during free-fall.

Consider those two cases: enter image description here

In one case from game experience point of view the player should land on top of it, and in the other case he did hit the edge, so he's going to fall down.

However, from my code point of view ("real behaviour") both those collision detection cases are identical. I am not sure how to separate them.

In both cases the vertical velocity is positive (falling down) and the user is moving with some fixed positive horizontal velocity. (moving right)

From a collision-standpoint the two cases are identical. How can I tell whether I should put the player on top of it or let him fall?

I am looking for a conceptual solution to my problem. It's a simple platformer-alike game where player can move horizontally during free-fall.

Consider those two cases: enter image description here

In the first case, from game experience point of view, the player should land on top of the box; and in the other case he hit the left edge, hence the player should fall down.

However, from my code point of view ("real behaviour"), both those collision detection cases are identical. I am not sure how to separate them.

In both cases the vertical velocity is positive (falling down) and the user is moving with some fixed positive horizontal velocity. (moving right)

From a collision-standpoint the two cases are identical, I think. How can I tell whether I should put the player on top of it or let him fall?

added 100 characters in body
Source Link
weno
  • 541
  • 4
  • 10

I need conceptual solution to my problem. It's a simple platformer-alike game where player can move horizontally during free-fall.

Consider those two cases: enter image description here

In one case from game experience point of view the player should land on top of it, and in the other case he did hit the edge, so he's going to fall down.

However, from my code point of view ("real behaviour") both those collision detection cases are identical. I am not sure how to separate them.

In both cases the vertical velocity is positive (falling down) and the user is moving with some fixed positive horizontal velocity. (moving right)

How to separate thoseFrom a collision-standpoint the two cases are identical. How can I tell whether I should put the player on top of it or let him fall?

I need conceptual solution to my problem. It's a simple platformer-alike game where player can move horizontally during free-fall.

Consider those two cases: enter image description here

In one case from game experience point of view the player should land on top of it, and in the other case he did hit the edge, so he's going to fall down.

However, from my code point of view ("real behaviour") both those collision detection cases are identical. I am not sure how to separate them.

In both cases the vertical velocity is positive (falling down) and the user is moving with some fixed positive horizontal velocity. (moving right)

How to separate those two cases?

I need conceptual solution to my problem. It's a simple platformer-alike game where player can move horizontally during free-fall.

Consider those two cases: enter image description here

In one case from game experience point of view the player should land on top of it, and in the other case he did hit the edge, so he's going to fall down.

However, from my code point of view ("real behaviour") both those collision detection cases are identical. I am not sure how to separate them.

In both cases the vertical velocity is positive (falling down) and the user is moving with some fixed positive horizontal velocity. (moving right)

From a collision-standpoint the two cases are identical. How can I tell whether I should put the player on top of it or let him fall?

Source Link
weno
  • 541
  • 4
  • 10
Loading