How do i convert ApplyImpulseAtPosition to ApplyAngularImpulse & ApplyImpulse?

Does anyone know how ApplyImpulseAtPosition is converted to Angularvelocity and Velocity?

I have a lot of ApplyImpulseAtPosition calls and want to convert all of them into a single ApplyImpulse and ApplyAngularImpulse call to save performance on some really heavy calculations.

Wouldn’t using ApplyImpulseAtPosition directly be better than splitting it up into two functions?

Im not 100% sure, right now they’re used in a big loop which is called a lot of times.

I think if i combine the math and call impulse + angularimpulse once instead of calling ImpulseAtPosition 20 times in a loop, i can save a lot of performance.

I’m guessing you have to call impulseatlocation 20 times because there are 20 objects?

No there is 1 object, but the calculations have to be done on multiple points on the same object, which is why there could be 20 or more ImpulseAtPosition calls depending on the size.

If i can combine the 20 calls into a single angularimpulse and impulse call, i think it will save a lot of performance.