Checking collisions from side of the object?

How do I check if I collide with object from specific side? E.g. like ? block in Mario or springboards in Sonic that allow only for collision from specific side to activate.

You can compare both objects position (or their center position to be more precise).

Thought about it, but that won’t fly as my character is higher than springboards.

//edit: :exclamation: Though if I will make 4 points on each side of character called up/down/left/right… That may work.

Hm… Doesn’t seem to work and when I disable comparison, character jumps on same height he normally does…

The jump speed should remains the same during the whole duration of the jump :slight_smile:

Hm, so how would I go about changing jump height just when player is bouncing out of spring and have normal height otherwise?

//edit: And just checked, Jazz Jackrabbit does springjump as soon as you touch the spring, so no point of bothering about which side you collided from.

Change the jump speed when needed, and change it back to the original value when the player is falling, it should work.

Thanks, works great!

Excellent! :smiley: