Author Topic: Feature Request: Adjustable blocking rectangles for characters/objects  (Read 1166 times)


After having this issue with the blocking areas of characters and objects, I thought it would be great if one could specify the area that is blocked (especially the height), to account for the perspective/depths of sprites.

One simple way would be to specify if an object's or character's blocking height is centered around the baseline or if it's lowest point is the baseline. A more advanced and maybe unnecessary way would be to set the corners of each rectangle.

Would something like this be feasible?

One simple way would be to specify if an object's or character's blocking height is centered around the baseline or if it's lowest point is the baseline.

That in particular should not be very hard to do, but I am not certain if this solution will cover most of problem cases. It may be worth to gather a list of most common practical situations when builtin collision does not work well to see which kind of quick improvement would work for them.
Universal solution would require implementing a "Collider" configuration that would let you to set up any custom area, e.g. with a mask.

PS. On a side note, is not using second object/character with 100% transparency an easy workaround for this?
« Last Edit: 18 Oct 2018, 13:00 by Crimson Wizard »


Yes, that is a workaround and in my case (where the object isn't supposed to move) I can just cut a hole into the walkeable area. I just think that either way it's rather annoying having to do this for every solid object.

Also, the blocking areas of the characters are off. With a perspective like this where characters aren't flat and have a few rows of pixels in depth, the blocking rectangle should have a lower y-value.

Looking at the Monsieur OUXX's comment in the other thread -
Yes. More generally, this might be a direction to follow for improvement : One should be able to configure the "ground point" of objects and characters. The fact that it's tied to the lowest pixel can be really annoying if there's, let's say, a cast shadow below. That means that the .z property should be universal, and, why not, configurable in the GUI.

Configurable Z property might actually be more flexible than switching between different alignment of a blocking height around baseline. I don't remember how blocking area works for characters with Z value though, does it react to changing Z at all (I will look into this)?, but in the worst case there may be some alternative there, like an X,Y offset of a blocking rectangle.

I think we'd need to draw a visual scheme of an object/character with its coordinate-related properties here for a reference of what we are trying to achieve.


Changing the Z property does work. Here's the situation with the normal blocking rectangle (second image) and changing the Z property to -4 (third image):

(blue is the walkeable area, the yellow lines indicate the character's basline)

If objects would have a Z property this could fix the problem. I'm not sure if this will cause other problems though and I already noticed that I have to alter the walkeable areas, because now the character is walking a few pixels into the area because her shoes go beyond the baseline. I also have to get used to the fact that now she is walking right into the cursor (and not above) when walking around.