Game Development Community

TileLayer bug?

by Jonathan Ohlrich · in Torque X 2D · 04/23/2007 (7:17 am) · 2 replies

The TileLayer seems to have a bug regarding collision. I could just be misunderstanding how to hook everything up as TorqueX is my first experience with anything Torque related. I am using TGBX to setup the scene.

For a test case I created a Tile Layer and an AnimatedSprite which were setup to collide with each other with a callback showing what types the ourObject and theirObject objects were. The only output I saw was
(our = T2DAnimatedSprite, their = T2DTileLayer).

When I replaced the TileLayer with a StaticSprite with the same collision settings, output was (our = T2DAnimatedSprite, their = T2DStaticSprite) (our = T2DStaticSprite, their = T2DAnimatedSprite), which is what I would expect.

Am I thinking about collisions and TileLayers wrong? Checked the forums / docs included in beta and couldn't find an answer.

Thanks,
Jonathan

About the author

Recent Threads


#1
04/23/2007 (9:40 am)
Check if you have collision on when you're painting the tiles in the tile layer as well. You can toggle the collision property of the "brush" you're using.
#2
04/23/2007 (2:14 pm)
Each individual tile as well as the tilelayer itself all have collision enabled. It is properly participating in a collision. An item dropped on a platform bounces off properly...I also disabled the top few tiles and had it bounce off a lower level platform in the tilemap to visually sanity check that collisions are properly recognized. However custom callbacks are only occuring on the item, not the platform.

When replaced with a static sprite, both the item falling and the platform receive callbacks.

Is there a way to attach T2DCollisionComponent's to individual tiles? In the XML output it seems as if its attached to the TileLayer itself, which would make sense if the callback work.