Hello, this is my first question, I recently register my account but I've been used wck since a week .
I need to know if two sensors are overlaped, these sensors are part of a BodyShape, actually they are the extremes of a " moving straw", I move each straw until they touch each other, but they only response with the extremes, I'm using the reportBegin and a listener for each "extreme", What I need is to know when they touch each other and the create a joint from extreme to extreme, but when I do that and I compile it, it shows me the next message:
I don't know if this is caused by the fact that the bodies (straws) are moving right before it creates the joint.
What I'll possibly do is to put the straws in position (with the edges overlaped) and Just After that, trigger the contactListener but I don´t know how can I detect the overlaping of the sensors (edges), Can someone help me please?
I need to know if two sensors are overlaped, these sensors are part of a BodyShape, actually they are the extremes of a " moving straw", I move each straw until they touch each other, but they only response with the extremes, I'm using the reportBegin and a listener for each "extreme", What I need is to know when they touch each other and the create a joint from extreme to extreme, but when I do that and I compile it, it shows me the next message:
Quote:
Assertion failed: (IsLocked() == false), function CreateJoint, file ../Box2D/Dynamics/b2World.cpp, line 210.
[object AlchemyExit]
at Function/<anonymous>()
at Function/<anonymous>()
at Box2DAS.Dynamics.Joints::b2Joint()
at Box2DAS.Dynamics.Joints::b2DistanceJoint()
at wck::Joint/createDistanceJoint()
at wck::Joint/createJoint()
at wck::Joint/create()
at misc::Entity/ensureCreated()
at misc::Entity/handleAddedToStage()
at flash.display::DisplayObjectContainer/addChild()
at wck::WCK/manejaContacto()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at Box2DAS.Common::b2EventDispatcher/dispatchEvent()
at Box2DAS.Dynamics::b2ContactListener/ContactDispatch()
at Box2DAS.Dynamics::b2ContactListener/BeginContact()
at Box2DAS.Dynamics::b2World/BeginContact()
at Function/http://adobe.com/AS3/2006/builtin::apply()
at global/AS3_CallTS()
at Function/http://adobe.com/AS3/2006/builtin::apply()
at Function/<anonymous>()
at cmodule.Box2D::FSM__ZN13WorldListener12BeginContactEP9b2Contact/work()
at Function/<anonymous>()
at Function/<anonymous>()
at Box2DAS.Dynamics::b2World/HandleStep()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at Box2DAS.Common::b2EventDispatcher/dispatchEvent()
at Box2DAS.Dynamics::b2World/Step()
at wck::World/step()
[object AlchemyExit]
at Function/<anonymous>()
at Function/<anonymous>()
at Box2DAS.Dynamics.Joints::b2Joint()
at Box2DAS.Dynamics.Joints::b2DistanceJoint()
at wck::Joint/createDistanceJoint()
at wck::Joint/createJoint()
at wck::Joint/create()
at misc::Entity/ensureCreated()
at misc::Entity/handleAddedToStage()
at flash.display::DisplayObjectContainer/addChild()
at wck::WCK/manejaContacto()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at Box2DAS.Common::b2EventDispatcher/dispatchEvent()
at Box2DAS.Dynamics::b2ContactListener/ContactDispatch()
at Box2DAS.Dynamics::b2ContactListener/BeginContact()
at Box2DAS.Dynamics::b2World/BeginContact()
at Function/http://adobe.com/AS3/2006/builtin::apply()
at global/AS3_CallTS()
at Function/http://adobe.com/AS3/2006/builtin::apply()
at Function/<anonymous>()
at cmodule.Box2D::FSM__ZN13WorldListener12BeginContactEP9b2Contact/work()
at Function/<anonymous>()
at Function/<anonymous>()
at Box2DAS.Dynamics::b2World/HandleStep()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at Box2DAS.Common::b2EventDispatcher/dispatchEvent()
at Box2DAS.Dynamics::b2World/Step()
at wck::World/step()
I don't know if this is caused by the fact that the bodies (straws) are moving right before it creates the joint.
What I'll possibly do is to put the straws in position (with the edges overlaped) and Just After that, trigger the contactListener but I don´t know how can I detect the overlaping of the sensors (edges), Can someone help me please?