From b2RevoluteJoint.as:
The 'SetAwake()' calls should be in EnableMotor(), rather than IsMotorEnabled().
Here's another one from b2Fixture.as:
The conditional should be 'if (m_body == null)', otherwise it fall through and accesses a null reference.
Code:
/**
* Is the joint motor enabled?
*/
public function IsMotorEnabled() :Boolean {
m_bodyA.SetAwake(true);
m_bodyB.SetAwake(true);
return m_enableMotor;
}
/**
* Enable/disable the joint motor.
*/
public function EnableMotor(flag:Boolean) :void{
m_enableMotor = flag;
}
* Is the joint motor enabled?
*/
public function IsMotorEnabled() :Boolean {
m_bodyA.SetAwake(true);
m_bodyB.SetAwake(true);
return m_enableMotor;
}
/**
* Enable/disable the joint motor.
*/
public function EnableMotor(flag:Boolean) :void{
m_enableMotor = flag;
}
The 'SetAwake()' calls should be in EnableMotor(), rather than IsMotorEnabled().
Here's another one from b2Fixture.as:
Code:
/**
* Set the contact filtering data. This will not update contacts until the next time
* step when either parent body is active and awake.
*/
public function SetFilterData(filter:b2FilterData):void
{
m_filter = filter.Copy();
if (m_body)
return;
[...does stuff with m_body]
* Set the contact filtering data. This will not update contacts until the next time
* step when either parent body is active and awake.
*/
public function SetFilterData(filter:b2FilterData):void
{
m_filter = filter.Copy();
if (m_body)
return;
[...does stuff with m_body]
The conditional should be 'if (m_body == null)', otherwise it fall through and accesses a null reference.