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.
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.
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.
I know you’re talking about impulses, which are slightly different from forces, but here’s how you get the moment exerted upon an object from a force that’s offset from the center of mass: