For my current game I developed a scripting language to describe vector/scalar fields (similar to the approach on [url="http://bitsquid.blogspot.co.uk/2012/10/a-data-oriented-data-driven-system-for.html"]bitsquid[/url]). It's working well for simple particle systems, but I'd now like to use it for our main game physics as well. The problem is, how can I generate the torque for a body given a field? A simple, brute force approach would be to sample the field at multiple points of the meshes surface and generate a force/torque. However, this would be:[list=1]
[*]Too computationally expensive to run on multiple game objects (based on profiling of the particle system and the number of objects in our scenes).
Any suggestions? We already use [url="http://en.wikipedia.org/wiki/Helmholtz_decomposition"]Helmholtz Decomposition[/url] to split our fields into div/curl free parts, which simplifies matters. I'm sure my old electrodynamics books could help, but I can't find them just now.