Intersection with static shape without collision
Posted: Mon Feb 04, 2013 12:00 pm
First off, thanks for the great physics engine. I want to confirm that I am on the right track for an application where the user controls a character that can move in and out of areas, and whose state can change simply by virtue of entering or leaving an area.
The idea is to add the character to the space as a regular body with a regular shape, and to attach the various area shapes to the static body of the space, then add these shapes to the space as well. Then, each static shape thus added is marked as a sensor, and collision callbacks are defined between the character and the area shapes, whose begin() callback returns FALSE. Thus, it is possible to determine when the character enters an area, in begin(), then when it leaves the area upon calling of separate(). However, the character can simply walk over these areas (not bounce off them) since intersection is detected but no collision is actually computed.
Is that a fair assessment of how things would indeed work, and am I on the right track indeed? Thanks!
The idea is to add the character to the space as a regular body with a regular shape, and to attach the various area shapes to the static body of the space, then add these shapes to the space as well. Then, each static shape thus added is marked as a sensor, and collision callbacks are defined between the character and the area shapes, whose begin() callback returns FALSE. Thus, it is possible to determine when the character enters an area, in begin(), then when it leaves the area upon calling of separate(). However, the character can simply walk over these areas (not bounce off them) since intersection is detected but no collision is actually computed.
Is that a fair assessment of how things would indeed work, and am I on the right track indeed? Thanks!