How do i edit the collision mask?
the buttons not there -_-
tiled sprite objects don’t have the option to do normal collision masks ![]()
So there’s no way to edit it at all?
i wish it did, maybe i should do a feature request…
How would you create a mask for a tiled sprite? Would it be a mask of the overall tiled area or a repeating mask of the original tile?
Creating a mask for a tiled object could make the mask complex and resource hungry. It wouldn’t create 1 larger mask, it would most likely need to create tiled collision masks as well. Each tile of the repeated image would create seperate polygons because the combined edges could create concave shapes. So, a tiled sprite that was resized to say 10 tiles would have 10 polygons. More if the tile image was complex and already used several polygons. As you can imagine, this could consume a lot of resources. It could need 30 polygons (3x10).
There could always be a method to optimize it
by attempting to simplify the mask into the fewest polygons but for the most part collision masks don’t need to be pixel perfect. A simple rectangle is often the most efficient shape.
It would also have to handle objects that were created or resized at runtime. The mask would also need to be recalculated if the image was offset in the X or Y.
I’m not criticizing your suggestion. I agree it would be nice to have a custom mask for tiled sprites. I’m just trying to point out some of the pitfalls.
Hi @zGameCreator!
There is always a solution! You have the possibility to create a invisible sprite of the size of the tile then, you put this sprite at the places you want.
So, you can manage the collision with another objects.
A+
Xierra
I’m not clear on the design but you could use a tilemap for the scenery. Then set the collision to the obstacle tiles. You can use seperate from tilemap unless you’re using the pathfinder behavior then you could use the nav mesh pathfinder. The Nav Mesh uses the collision box while the built-in pathfinder uses the object size.
What does the collision mask for the player look look like? Maybe it’s too big?
How are you moving the character?
That looks good. The mask is right against the image.
How are you seperating the objects? With the seperate action?
I did a quick test and I was able to get right up against a tiled sprite.
What does the collision boxes look like when you use the debug action.
This is how my test project looks. The blue rectangle is a tiled sprite.
Does the character have different animations? Do those animations have tight collision masks?
platformer behaviour and platform behaviour.
From your ss it very looks like your origin/center is offsetted so when the sprite flip it creates a gap to the wall…fix:center the image
From my experience i suggest you to center the origin to sprite middle bottom.
no yet, il go try now.
are u saying in the collision mask of player put it more to the centre?
that, aand
u need to center your sprite and your sprite origin to have a precise collision mask flip.
first center your mask then edit points and put origin at midle bottom
yes,but some other things:
nope the origin is offsetted. The origin should cut the image AND the mask in half symmetrically.