Julio Jerez wrote:nice!!,
since we have that demo now I will quickly add the utility function that calculate, a more realistic Archimedean buoyancy force
I fiddled a bit with that, trying to implement the code in the sandbox archimedes demo into the NewtonWrapper.
My idea was to implement a function called CalculateBuoyancy directly on the dNewtonBody class and then you only need to pass the plane and viscosity value and get the correct force and torque back.
I'm pretty sure I did everything right but the marshalling of the calculated force and torque just returned 0 values. I let you handle that instead because I'm about to toss my computer out of the window.
I need to figure out how to debug the plugin while running Unity because it's difficult to find problems like this without a debugger. I don't know if it was the marshalling or my c++ code that was the problem.