cube collision problem

i have the 2D gameplay tutorial project and the cubes that the player pushes glich all over the screan when they touch the death trigger is there a way to get them to destroy when thay hit it

Its easy. The deathTrigger invokes a OnDeath() function in any gameobject that collides with it. In the ‘PlatformerController’ script of Lerpz, you can see a function called OnDeath().
To destroy any cube that touches the deathTrigger gameobject just use this :

function OnDeath(){



Save this code as say ‘deathAdder.js’ and add it to the cube or in fact any thing that you want to destroy when it collides with the deathTrigger.