I've just downloaded 2.1 and I'm completely lost on the new Contact Listener and the documentation hasn't caught up on the new system.
Before I would do this:
But b2ContactPoint and Add no longer exist.
And I need all of the information in there. I need both shapes, the contact point and the collision normal.
I'm assuming that I would override the new BeginContact method and try to extract data from the Contact object:
But how do I get my shapes, contact point and collision normal?
Before I would do this:
Code:
override public function Add(point:b2ContactPoint):void {
add_list.push(new ContactPoint(point.shape1, point.shape2, point.separation, point.position.Copy(), point.normal.Copy()));
}
add_list.push(new ContactPoint(point.shape1, point.shape2, point.separation, point.position.Copy(), point.normal.Copy()));
}
But b2ContactPoint and Add no longer exist.
And I need all of the information in there. I need both shapes, the contact point and the collision normal.
I'm assuming that I would override the new BeginContact method and try to extract data from the Contact object:
Code:
public virtual function BeginContact(contact:b2Contact):void { }
But how do I get my shapes, contact point and collision normal?