JV-ODE Physics Thread 2

Blitz3D Forums/Blitz3D Userlibs/JV-ODE Physics Thread 2

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.


Are there any demos with varying friction and restitution per object?


Not yet, but if you tell me exactly what you need I'll try to put one together for you.


As I understand it, responses need to be created per collision, determning which objects have collided and creating the approproate response, unlike Tokamak where the engine has inbuilt friction and restitution. Collisions create joints, and one has to manual create responses, right?


ODE determines which geoms have collided during each time step, a contact joint is then applied to create the appropriate response. This is done automatically within the wrapper so you don't need to create a manual response. The process takes into account all contact settings like friction on each individual geom that has collided.


Looking at the demos with JV-ODE I've been able to make the objects bouncy say, but haven't found how to create different materials like 'Ice' and 'Rubber' to apply to individual ojects.


It sounds like you're setting the global (or world) contact settings. JV-ODE allows you to set these contacts for each individual geom. For example, if you have 20 spheres, you can set 1 sphere to be bouncy and the other 19 to not bounce if you wish. You can set these using the Geom Contact Functions - see the ode.decls file for the list of functions.


IS there anywhere describing JV-ODE's unique functions too, like dContactSetBounce()? Where can I read what this does and how to use it? It's not in the ODE .pdf.


Those functions allow you to manually set the default contact joint surface parameters used in the internal wrapper collision routines I mentioned above. They are described in section 7.3.7 of the PDF manual. For example, dContactSetBounce() would be used to set the default dContactBounce parameter of the contact joints.

@Cygnus: I'm doing my very best :) I would advise you sphere wrap stuff instead as the original ODE TriMesh doesn't handle cube and ccylinder collisions very well at all. They're also very slow in comparision. What do you need them working for, is it the car bodies when they overturn etc? If so, you'll find sphere wrapping the car body is the fastest solution. Let me know if you need any help with this :)