Monster hitbox issues 4.1.5 (solved)

mouse spirit

Well-known member
When i have a tall monster with a tall hitbox, it doesnt seem to work correctly. Probly my fault somewhere.
My monster is 6 blocks high and 1 block in width.
Hitbox is the same size,i have tried many different things
But would like it if i can just have the hitbox work right for tall monsters. Although i can workaround it, but this time id rather not.

My code is simple, when projectile hits lava deathtile, change to ice walk behind tile and change graphic.

When ice walk behind tile is hit by this specific monster, change back to lava deathtile.

Both easily done and work with a 1 by 1 or 2 by 1 monster,generally a small object works great.

My issues are that it doesnt work on all tiles, or the hitbox
Isnt as long as i made it.
I think its more the hitbox because if i reposition the monster, it works on those tiles.

My feeling is that the hitbox is working only on the top
Of the hitbox. Sometimes the middle is inconsistent,
And the bottom never works.

But look at the gif, now it seems just to be those two tiles?

If it is not my fault, i would guess in error with stretching monster hitbox but i am confused.

In this gif i actually had 2 tall monsters on top of eachother because i was trying alot of different tests.The error occures in all circumstances, 1 monster or 2.
dfhsdfhsfh.gif

dfbzdFhbz2.gif


Lastly, could it be the macro changetileatcollision?
 

dale_coop

Moderator
Staff member
Haha... you are dealing with the limitations of the engine...
The collision detection checks points of the object, top corners and the side middle. 6 points of collisions per object.
For very big objects, it would cause issues, yeah.

Checking more than 6 points of collision per object would slow down heavily your game.
You could separate your object in 2 monsters... synchronized... if those monster are immure to weapons and no recoil, ...
 
Top Bottom