Game Development Community

Tile Layer Collision and Panning

by Michael Woerister · in Torque Game Builder · 08/05/2006 (6:32 am) · 0 replies

Hi,

I don't if you can call it a bug but at least it can be quite irritating if you don't know what's going on behind the scene. With panning The tile-layer collision can extend over it rendering area. A picture descripes it best:

www.unet.univie.ac.at/~a0402917/PanPosBug.png
The problem is that in the whole t2dPhysics object it fetched for collision detection while only half of the tile is displayed. A possible solution would be to adapt the collision polygon of the t2dPhysics objects in question at run-time. But I can imagine that would be quite costly calculation-wise.

Another solution would be to just disallow collision for panned layers.