rapier
rapier copied to clipboard
[Question] Calculating one way platform's allowed normal from segment's normal
Hello folks, I'm trying to create a one-way platform with the allowed normal (passed to ContactModificationContext::update_as_oneway_platform
) dependent on the collided polyline segment's normal. However, I'm having trouble figuring out how to obtain the collided segment's normal to perform the calculation. Anybody can help me out here?
For context, I'm trying to enable/disable one way platforms based on the winding order they are defined (I'm using polylines). E.g. if a line is defined CCW, it can collide only from one side; if CW, the opposite side.