So I was right… The weird thing is, altering the density of the crate doesn’t seem to affect it in the slightest. Density=2 and density=500 yields the same slow feather-like fall. It does affect how the bullet hits it though, lower densities make it fly further (and easier) than higher densities.
And another question, something that I thought would be easier, but is apparently more difficult than I thought. How do I run code on collision? For example, I want to print something when the bullet hits the crate.
I tried using the example code from the Detect Collisions code
[code]local function onLocalCollision( self, event )
if ( event.phase == “began” ) then
print( self.myName … ": collision began with " … event.other.myName )
elseif ( event.phase == “ended” ) then
print( self.myName … ": collision ended with " … event.other.myName )
end
end
projectiles_container.collision = onLocalCollision
projectiles_container:addEventListener( “collision”, projectiles_container )[/code]
But I’m not quite sure how to call the bullet. But I dont think projectiles_container is the one I need to call. Nor am I quite sure where to put this code. [import]uid: 200198 topic_id: 36150 reply_id: 143592[/import]