I tried with the box, but maybe I have not properly implemented the collision system.
This is the code of my vent:
--------------------------------------------------------------------------------- -- -- vent.lua -- --------------------------------------------------------------------------------- local display\_newImageRect = display.newImageRect local physics = require("physics") physics.start() physics.setDrawMode("hybrid") local M = {} local CBE = require("CBEffects.Library") function M:new(xv ,yv, collisionVentHandler) if ( collisionVentHandler and type(collisionVentHandler) == "function" ) then M.callback = collisionVentHandler else error( "No callback function listed" ) end local function collisionVent( event ) M.callback( event ) end local xvent = xv local yvent = yv local self = CBE.newVent { title = "hyperspace", positionType = "atPoint", x = xvent, y = yvent, build = function() return display\_newImageRect("CBEffects/textures/glow.png", 10, 5) end, color = {{1}}, emitDelay = 100, perEmit = 9, inTime = 500, lifeTime = 0, outTime = 1200, startAlpha = 0, onCreation = function(p) p.anchorX = 0 p.name = "spacestorm" physics.addBody(p, "kinematic") p:addEventListener('collision', collisionVent) end, onUpdate = function(p) if p.\_numUpdates \> 3 then p.\_cbe\_reserved.rotateTowardVel = false end end, propertyTable = {blendMode = "screen"}, rotateTowardVel = true, physics = { linearDamping = 0.9, velocity = 0.01, angles = {{1, 360}}, scaleRateX = 1.16, maxScaleX = 100, } } return self end return M