Hi there,
I'm just trying to work with a complex body (more than one fixture shape) but the results puzzle me. Here's how it looks. (See attachment)
The shape that surrounds the player is the main fixture. It does all the physics and all that.
The little shape floating above the head is a sensor fixture.
On EnterFrame, I call the GetContactList() function of the player. I iterate through all the contacting edges.
What I want is to know if the Sensor has any contact to any object in the world.
Therefor I check both fixtures of the contact edge and see if one fixture has "isSensor" set to true.
So far so good.
The problem is - when I get close to the wall - the ContactList tells me that one edge of the Sensor Fixture has contact. Even if this is obviously not the case.
This is what gives me a headache... is this some kind of common thing? Did I oversee something?
I would appreciate your help with this.
Cheers,
Eph
I'm just trying to work with a complex body (more than one fixture shape) but the results puzzle me. Here's how it looks. (See attachment)
The shape that surrounds the player is the main fixture. It does all the physics and all that.
The little shape floating above the head is a sensor fixture.
On EnterFrame, I call the GetContactList() function of the player. I iterate through all the contacting edges.
What I want is to know if the Sensor has any contact to any object in the world.
Therefor I check both fixtures of the contact edge and see if one fixture has "isSensor" set to true.
So far so good.
The problem is - when I get close to the wall - the ContactList tells me that one edge of the Sensor Fixture has contact. Even if this is obviously not the case.
This is what gives me a headache... is this some kind of common thing? Did I oversee something?
I would appreciate your help with this.
Cheers,
Eph