Game Development Community

Collisions when using tilemaps?

by Ty Newton · in Torque X 2D · 01/14/2007 (9:26 pm) · 6 replies

Hi,

I tried to setup a tilemap with collisions and it doesn't seem to work. I created a tilemap and brush'd in a couple tiles with a material. I made sure the collision vector was the full size of the tile.

Is this the way to do collisions with tilemaps or is there another way?


Thanks,
T

#1
01/14/2007 (10:23 pm)
Did you add a collision component and set it to collide with the object type that you are trying to collide with? Should have a collision comp set up for the object you want to collide as well.

#2
01/15/2007 (5:30 am)
I have collisions working with tile layers. Here's how I have it set up.

1. Layer: collisions enabled, no components
2. Tiles: collisions enabled on some individual tiles
3. Player: collisions enabled, collision component collidesWith t2dTileLayerType and TileType

#3
01/21/2007 (3:04 pm)
I started my project again and was very careful about setting the collision options. This time everything is working. I must have made a simple mistake somewhere.

Thanks for the help.
#4
01/30/2007 (11:29 am)
Where are these collision types defined? How would you go about figuring that info for other object types?
#5
01/30/2007 (11:43 am)
What collision types? Do you mean the resolve types?




www.linkedin.com/img/webpromo/btn_viewmy_160x25.gif
#6
01/30/2007 (5:43 pm)
The collision types are of formal type TorqueObjectType and are typically fed in through the CollidesWith field of the collision component.