I attach some fixtures around one body to be sensor. When pre-collision listener find one sensor is going to be contact with other body, I will disable the contact sothat sensor fixture won't affect body's moving and make user data knows its sensor detect something. But the pre-contact event only occurred once during the whole contacting. I can't check the sensor's state when the sensor has already contacted with bodies. The other problem is speed. Creating 5 sensors on each body will make program running very slowly because b2world step processing needs to keep tracking many fixtures. If I move sensor contact processing codes to post contact listener, I guess I have no way to disable the collision affects so body can't moving.
Is there any other good suggestion can help me to create sensor in other way ? a faster way approach to my target.
Thanks
Is there any other good suggestion can help me to create sensor in other way ? a faster way approach to my target.
Thanks