Make crates/blocks stack rather than fall?

All I want to do is when crates fall ( like in ManyCrates sample app), when they collide I want it to stay there and not tip over (stacking). Does anyone know how that can be done?

Thanks, Jason [import]uid: 8335 topic_id: 5696 reply_id: 305696[/import]

My idea right now is to make an array, and when the blocks/crates are created, assign them a tag or id and then when that one collides, some how change their body type (physics property) to “static” rather than “dynamic”.

[import]uid: 8335 topic_id: 5696 reply_id: 19703[/import]

if collision with crate then stay where it is?

Or how did you think? [import]uid: 9577 topic_id: 5696 reply_id: 19765[/import]

yes, when the crates collide together then make it stay where it is (and not tip over) so they can stack up… [import]uid: 8335 topic_id: 5696 reply_id: 19821[/import]

Do you mean something like this?

local block = display.newImage( "question\_block.png" ) block.x = 240; block.y = 125 physics.addBody( block, { density=1.0, bounce=0.4 } ) block.isFixedRotation = true -- question blocks don't rotate, they just fall straight down

If so, this was taken from the “Drag Platforms” sample app. The last line is what you want. [import]uid: 31262 topic_id: 5696 reply_id: 19926[/import]

Thanks it works!!! [import]uid: 8335 topic_id: 5696 reply_id: 20581[/import]