Character clips through events when jumping...

So I have a problem of my character clipping thru events when they jump in front of them. I'm not sure how to make it so the player keeps priority when jumping in front of events.

Jump event.PNG


as you can see, the shadow of the character is visible but you can't see the player as they've clipped behind the event.
this only seems to happen though when the player jumps. is there anyway for the player to stay in front of event's priority wise when in a situation like this?
What is your event's Priority set to? It isn't "Above characters," is it? If you set it to "Same As Character" or "Below," the player shouldn't go underneath the event. I'm guessing you need to set it to Same As Character so your player doesn't walk over it.

1632175018922.png
it's set to same as character. I've noticed it doesn't cilp through the base of the event, meaning the very bottom of it. the higher I go up though the more likely I'll clip through the top of the event though.
The image for your event. Is it from your tileset with an invisible event on top of it? Or is the image set from within the event?

If the image is from your tileset and the event is same as character with no image... check your tileset icon to make sure it's passage isn't set to "above" (the star icon).
It's an image set from within the event. I've noticed no matter the size, the player clips through the top of the image when jumping. so even events the same size of the player, it happens. I'm not sure if the game is registering how big my event image is.
If I understand your problem correctly, this should fix:

JavaScript:
//=============================================================================
// ** RPG Maker MV - DragonMV_FixJumpDisplay.js
//=============================================================================

var Dragon                      = Dragon                  || {};
Dragon.Fixs                     = Dragon.Fixs             || {};
Dragon.Fixs.JumpDisplay         = Dragon.Fixs.JumpDisplay || {};
Dragon.Fixs.JumpDisplay.VERSION = [1, 0, 0];

/*:
 * @plugindesc [RPG Maker MV] - Correction of character sprites display when jumping. (v.1.0.0)
 * @help http://dragonrefuge.net
 * @author The Dragon (Jorge Feitosa)
 */

//-----------------------------------------------------------------------------
// Game_CharacterBase
//
// The superclass of Game_Character. It handles basic information, such as
// coordinates and images, shared by all characters.

Game_CharacterBase.prototype.jumpHeight = function() {
    if (this.isJumping()) {
        return (this._jumpPeak * this._jumpPeak - Math.pow(this._jumpCount - this._jumpPeak, 2)) / 2;
    } else {
        return 0;
    }
};

//-----------------------------------------------------------------------------
// Tilemap
//
// The tilemap which displays 2D tile-based game map.

Tilemap.prototype._compareChildOrder = function(a, b) {
    if (a.z !== b.z) return a.z - b.z;
    var
    aY = a.y + (a._character ? a._character.jumpHeight() : 0),
    bY = b.y + (b._character ? b._character.jumpHeight() : 0);
    if (aY !== bY) return aY - bY;
    return a.spriteId - b.spriteId;
};
If I understand your problem correctly, this should fix:

JavaScript:
//=============================================================================
// ** RPG Maker MV - DragonMV_FixJumpDisplay.js
//=============================================================================

var Dragon                      = Dragon                  || {};
Dragon.Fixs                     = Dragon.Fixs             || {};
Dragon.Fixs.JumpDisplay         = Dragon.Fixs.JumpDisplay || {};
Dragon.Fixs.JumpDisplay.VERSION = [1, 0, 0];

/*:
 * @plugindesc [RPG Maker MV] - Correction of character sprites display when jumping. (v.1.0.0)
 * @help http://dragonrefuge.net
 * @author The Dragon (Jorge Feitosa)
 */

//-----------------------------------------------------------------------------
// Game_CharacterBase
//
// The superclass of Game_Character. It handles basic information, such as
// coordinates and images, shared by all characters.

Game_CharacterBase.prototype.jumpHeight = function() {
    if (this.isJumping()) {
        return (this._jumpPeak * this._jumpPeak - Math.pow(this._jumpCount - this._jumpPeak, 2)) / 2;
    } else {
        return 0;
    }
};

//-----------------------------------------------------------------------------
// Tilemap
//
// The tilemap which displays 2D tile-based game map.

Tilemap.prototype._compareChildOrder = function(a, b) {
    if (a.z !== b.z) return a.z - b.z;
    var
    aY = a.y + (a._character ? a._character.jumpHeight() : 0),
    bY = b.y + (b._character ? b._character.jumpHeight() : 0);
    if (aY !== bY) return aY - bY;
    return a.spriteId - b.spriteId;
};
Ahh thanks! this works perfectly. my character can now jump in front of events without clipping through the top of them. much appreciated. I'm curious though if you don't mind me asking, what exactly does this do? like what is it changing? It's mostly me asking because I'm wondering why it clips in the first place.
By default, characters are sorted by their Y position on the screen, that is, the higher the Y position, the higher the character's priority.
When the player jumped behind the event, he would naturally appear from behind because of his Y position, which at that moment would be smaller than that of the other entity.
What I did was just also consider the jump height in the ordering: char.y + char.jumpHeight.
ahh ok, I see what you saying. I never thought about that. thanks again though.

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/character-clips-through-events-when-jumping.140632/