I'm attempting to change the 'active' setting of a dynamically created BodyShape upon a beginContactEvent involving one of its peers within the same MovieClip.
(I only mention that it's dynamically created because I've had no trouble changing attributes on BodyShapes that are not.)
I'm detecting contact between object1 & object 2 successfully, but I've been unable to find the right syntax for setting object3's 'active' value.
Here's one of many failed attempts:
private function handleContact(e:ContactEvent):void
if (e.other.m_userData.name == "object1" && e.fixture.m_userData.name == "object2")
var theMutualParent = MovieClip(MovieClip(e.fixture.m_userData).parent);
LineArc90(theMutualParent.object3).active = true;
When contact occurs I get the following error: "Assertion failed: (m_world->IsLocked() == false), function SetActive, file ../Box2D/Dynamics/b2Body.cpp, line 426."
I appreciate any insight! Thanks!