My object collides event though it doesnt touch the other object all the way

It gets close to another object and says it collided even though it doesnt actually collide.

To ensure that it was not collided with a transparent part of the object can you try to put the following code

          physics.setDrawMode(“hybrid”)

and see whether there is a transparent part which is collided.

yes it was colliding with a transparent part of the object, how to i fix this?

You can create shape that only cover your non transparent object, here is the example

local yourObjShape = {-50,50, -60,-60, 60,-60, 60,60 }  – this shape is your non transparent object, set the value based on your object

local yourObjBody = { density=0.5, friction=0.1, bounce=1, shape=yourObjShape}
physics.addBody( yourObj, “dynamic”, yourObjBody)

Now it will colliding with yourObjShape (non transparent object)

To ensure that it was not collided with a transparent part of the object can you try to put the following code

          physics.setDrawMode(“hybrid”)

and see whether there is a transparent part which is collided.

yes it was colliding with a transparent part of the object, how to i fix this?

You can create shape that only cover your non transparent object, here is the example

local yourObjShape = {-50,50, -60,-60, 60,-60, 60,60 }  – this shape is your non transparent object, set the value based on your object

local yourObjBody = { density=0.5, friction=0.1, bounce=1, shape=yourObjShape}
physics.addBody( yourObj, “dynamic”, yourObjBody)

Now it will colliding with yourObjShape (non transparent object)