Hi,
I am using Physics Editor to define the shape of an object in corona.
The .lua file generated from the physics editor for an object is included like this:
local obj1ShapeData = (require “obj1”).physicsData()
And the body is added to physics engine like this:
physics.addBody( obj1, obj1ShapeData:get(“obj1_00001”) )
obj1_00001.png is my image file name
This code works fine, however i am not able to define other properties like sensor, filter on the object while adding to physics engine.
I used different ways to add the object as shown below, but in both cases it crashes the game:
- physics.addBody( obj1, { isSensor = true, filter = fenceObjectFilter, shape = obj1ShapeData:get(“obj1_00001”} )
2)1) physics.addBody( obj1, obj1ShapeData:get(“obj1_00001”, { isSensor = true, filter = fenceObjectFilter )
both methods does not work. Can anyone help me resolving this issue?
[import]uid: 10239 topic_id: 7042 reply_id: 307042[/import]


) [import]uid: 26706 topic_id: 7042 reply_id: 32244[/import]