I cant understand about Collision Layers?
by Matthews_30 · in Torque Game Builder · 08/09/2006 (10:58 am) · 1 replies
Can somebody explain me please?
i read the tutorial but i cant understand it, very clear.
Thanks a lot.
matt.
i read the tutorial but i cant understand it, very clear.
Thanks a lot.
matt.
Torque Owner Apurva Amin
Now say you had an object that you wanted to have in the background. For example, a telephone box. You don't want the player to collide with the telephone box, but you want a grenade to collide with it. You would use the "setCollisionLayers" command. Say the telephone box was on layer 10, and the player was on layer 2. You would set the player to not collide with layer 10. This means that the player will walk through anything on layer 10, such as the telephone box. However, if you have a grenade, you can set it to collide with layer 10. This means that the grenade can explode the telephone box, but the player can't walk in to it. Having collision layers means you can seperate what collides with what.