sbPhysics 0.1.4 in a spin

Well after a weeks Hiatus while I blenderised myself, I'm releasing version 0.1.4 of the Plugin for demo purposes. Progress has been a  slower than expected due to some of the complications I'm now coming up against as I drill further down into the Bullet API. Documentation is very sparse I'm afraid, despite the many demo's, and the official bullet bullet forum is rather slow on answers, so there's a lot of trial & error involved. What I've managed to achieve from my todo list from last time is :-

  1. Capsule & Convex Hulls are go! - I've tested the creation and they seem to be working. Part of my "blenderisation" was to build the rock to demonstrate convex hulls. You can use the demo so see some of the advantages (and disadvantages) of convex hulls, but for all of those of you looking for an odd convex shape that needs a rigid body to match, it's all set. Note the code currently just maps every vertex on your object to a hull point, so objects with large numbers of vertices may not be the most efficient.
  2. Hinge Constraints - There's a hinge constraint in the demo scene now. Having some problems when there are overlapping rigib bodies at the constraint point, so one of the bodies is static for the demo to show it working. I'm not sure if the problem with overlapping bodies is a Bullet limitation, or something I need to code around. That's one of those questions I'm still searching for answers for. The time I've spent working on getting the hinge right meant I ran out of time to work on the slider for this version.
  3. Linear and Angular impulses have been tested and are working. You can use the "Bump" and "Spin" HUD buttons I've added to test them out.
  4. I spent some (i.e. a LOT) of time in the last 2 weeks trying to figure out how to get automatic body alignment. Despite some vague tips from NiCoX on vector dot products, I'm still trying to figure this one out, without having my code axis-align the object, adding the body, then rotating it back again. I'm looking for a more elegant solution, but am yet to find it. Once again,  vector, matrix and quaternion maths are giving me headaches.

As well as those items on the list, I've added two new functions

  1. bOK = sbPhysics.wakeAll (  ) - Activates all bodies in the world
  2. bOK = sbPhysics.wake(sObjectTag) - Activates the body attached to the object with the given tag

A wakeAll calls has been added whenever you change the gravity value, so objects that were previously asleep already now wake up and move again inr esponse to a gravity change. The demo scene has had a Capsule, Complex Hull, and Hinge Bodies added to demonstrate the tested features, the extra HUD buttons as mentioned above, and I've put body damping on some of the objects to try and better simulate a more 'realistic" effect due to gravity, torque and force impulses. So that's it for this week. I have some R/L stuff coming up next week, so not sure where I'll get to. I'll continue to work on the things above I have yet to complete, and I'd like to get to Raycasting soon, but I think there's some underlying infrastructure tweaks I might have to make first. So all I can say is, stay tuned for the next update. Here's the link to version 0.1.4 http://synapticbytes.com/sbPhysics-0.1.4