On Mon, May 4, 2015 at 6:00 PM, ottop <[email protected]> wrote:

> Hi, I noticed that TmxObjectMapCollider in tiles.py is not functioning
> perfectly at the moment. It requires tmx objects to have a Tile for them to
> be collidable. And if you do assign a tile to a tmx object in a tmx file,
> the tmx object's dimensions will be set to those of the Tile's image in the
> constructor (so the behavior will be the same as with RectMapCollider).
>
> It seems to me that if you change that one line
> <https://github.com/los-cocos/cocos/blob/master/cocos/tiles.py#LC1908>
> (1908) where it says that an object has to have a Tile to collide it, the
> collider works fine -- with all tmx objects having a rectangular collision
> body.
>

Will need some other changes (width - size are stored in different
locations re tiles - other objects) but I think the generalization should
be easy.

Will need to write a test to avoid stupid mistakes, and want to finish some
unrelated work but it should land in the repo near term


>
> Is the collider finished otherwise?
>

Attention was on the parsing, not on the collider, but at first sight looks
near parity with stock tiles. There's no intention ATM to refine the
collision when other shapes are involved.


> I didn't encounter other problems with it. Of course collisions with other
> shapes could be supported but for me rectangles are enough. I like the
> interface of RectMapCollider and would like to use this similar collider
> for tmx objects.
>

I will see to add that shortly.

-- 
You received this message because you are subscribed to the Google Groups 
"cocos2d discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/cocos-discuss.
For more options, visit https://groups.google.com/d/optout.

Reply via email to