You’re welcome Achim, I learned a lot from the community so just trying to give back a bit
The version I posted previously could only work in Touch088 x64 version. Now I just updated the zip file with a x86 version of the dll and a touch077 example file. But be aware it won’t work in Touch077 FTE, since this version doesn’t allow the loading of .dll (last time I checked).
It’s also possible you don’t have the proper redistributable installed for whatever version of MSVC it was compiled in. Search for Visual studio 2010 redistributable (or Visual studio 2012) depending on which version it was compiled for.
Thanks for sharing!
Would you mind sharing or pointing to the right procedure to get the bullet libs installed? Never installed libraries of this type before…
The cplusplus chop is using Bullet, but you only need to get the bullet source code/compile the bullet library if you want to compile the cpluscplus chop yourself.
Bullet is designed as static library so no additionnal dll is needed.
If you want to make some modification and compile the cplusplus chop then you need to get bullet 2.81 source from code.google.com/p/bullet/downloads/list, compile the static libs (using the vs2010 project file) and point to these in the BulletCHOP vs2010 project settings.
There shouldn’t be any difference between the 64-bit and 32-bit versions in terms of stability. Can you send your. dmp files to support@derivative.ca and we’ll see what the issue is?
Malcom is right, there shouldn’t be any difference between 32 and 64bits version.
There’s not much error checking made in the code, maybe changing the number of objects on a different frame than 1 crashes for example, I’ll need to have a look.
Keep in mind this was done as a quick exercise and to show a starting point to add physics in Touch, but is not production ready, and you need to some c++ knowledge to extend it.
I’ll definitely work on it again at some point though I don’t know when.
Cheers - I do believe it is probably me trying to push something a little further than it is meant to be pushed yet… I am trying to create a realistic hourglass simulation with particles (particles running through an hourglass-ish geometry- the collision object) - and running the particle positions through the bullet physics then instancing rects at the particles updated positions. I imagine this is just too heavy for it at this stage?
I would love to be able to extend this, but my C++ knowledge is pretty limited. I guess I just have to wait until physics are built into touch!
Working with this now - thank you for making it - but I’m running into a minor problem.
It looks like the ‘static’ geometry needs to be passed in as a CHOP with samples for each quad in the fixed geometry - pos, orientation and XYZ scale, as far as I can tell.
I can work with that - assuming two many quads don’t slow it down too much, but how would I convert a SOP consisting of quads in a mesh into those quads?
Is there a SOP operator to do this? Or do I need to build the collision geo manually from quads (yuck).
You can use this toe file to turn a polygon mesh into a DAT list where each row contains the xyz of three vertices. I was able to modify the BulletCHOP code and bounce boxes off a noisy sphere.
A minor bug in BulletCHOP.cpp is that
output->channels[QX][index] = float(rot.x());
should be
output->channels[QX][i] = float(rot.x());
Has anyone set up a collision callback function? I set up the callback with how get collision callback of two specific objects using bullet physics? - Game Development Stack Exchange When numContacts is greater than 0 I think that the objects have collided. Then I check what type they are with a custom struct MyData and
MyData * myData = (MyData *) (obA->getUserPointer()). The MyData struct should have been created with setUserPointer() when I created the object.