-
Is there a way to set the sensor after constructing the shape or is it only possible to create a sensor by providing |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
There's no way to set the sensor flag after constructing the shape. It would be tricky to implement because the shape keeps a "sensorIndex" which points to an element in an array of sensors. The way removing from an array works is that the removed index is replaced with the last index, and the size is reduced by 1. So if you set |
Beta Was this translation helpful? Give feedback.
-
Events get weird if something stops being a sensor. Consider the end touch event: struct b2SensorEndTouchEvent
{
b2ShapeId sensorShapeId;
b2ShapeId visitorShapeId;
}; I have two choices that both seem potentially buggy. Either I drop the event, which may confuse some users or I return the event but now the I think I can manage the data structure issues, the main problem is the non-intuitive results. |
Beta Was this translation helpful? Give feedback.
Events get weird if something stops being a sensor. Consider the end touch event:
I have two choices that both seem potentially buggy. Either I drop the event, which may confuse some users or I return the event but now the
sensorShapeId
is not a sensor.I think I can manage the data structure issues, the main problem is the non-intuitive results.