rapier icon indicating copy to clipboard operation
rapier copied to clipboard

[Question] Calculating one way platform's allowed normal from segment's normal

Open ghost opened this issue 3 years ago • 0 comments

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.

ghost avatar Apr 05 '21 09:04 ghost