A new version of Dark Physics has been released. Download it from your Order History. There is no installer at this point. All you need to do is copy the DLLs into your plugins-licensed folder and ensure you are using the latest Ageia runtimes.
3 new example projects have been included. They show collision feedback, force fields and ray casting.
The main changes are:
General
When an object is removed from the simulation control is now correctly returned to DB Pro.
Fixed an issue which resulted in being unable to switch kinematic objects off.
The command “phy set rigid body rotation” will now clear angular and linear velocity.
Updated string table for “phy get character controller exist”.
The command “phy get rigid body type” now returns the correct type index.
Materials for convex objects are now applied correctly.
CCD can now be used with spherical objects.
Changed the way static and dynamic meshes are transformed when entered into the simulation. It now takes into account all relevant limb transforms.
The command “phy clear” will now remove joints from the simulation.
Solved a crash when a convex rigid body was created without a material.
Altered the way regular and convex meshes are created. This will result in faster creation times.
Added a check when attempting to load dynamic meshes to confirm that the file exists.
Turning off the kinematic state for an object will now result in it being woken up. This means that gravity and any other forces will be applied instantly.
Adjusted culling code. This will result in objects being culled correctly.
Made adjustments to static mesh loading code that solves some issues with incorrect data being used (need to do this for dynamic meshes).
Joints
Updated the command “phy delete joint”. Tested it with several examples.
Added a new command called “phy get joint state”. It will return 0 when the joint is not being used, 1 when the joint is simulating and 2 when the joint has broken.
Collision
New command added “phy get collision”. It takes two parameters “object A” and “object B”. It returns true if the objects have collided and false otherwise. This command can be used as an alternative to the collision stack approach.
New command added named “phy set collision state”. It is used to enable or disable collision and response. It takes two parameters with the first being the object ID and the second being the state. Use a state value of 0 to disable collision and response and 1 to enable collision and response.
An alternative ray cast command has been provided. It is called “phy ray cast” and takes 6 parameters. The first three parameters are the origin of the ray and the final three are the world space coordinates for the target of the ray. This command will return a value of 1 if the ray intersects an object. An extra version of this command is provided that takes an additional parameter. The parameter controls what kind of objects are targeted in the ray cast. Use 0 for all objects, 1 for dynamic objects and 2 for static objects.
Particles
Changed the way particles face the camera. This should solve issues whereby particles may vanish.
Cloth
The command “phy delete cloth” has been added into the string table.
Force Fields
New set of commands added to deal with force fields.
Here are the new force field commands
phy create force field ID
phy delete force field ID
phy set force field rigid body ID, Object
phy set force field cloth scale ID, scale#
phy set force field constant ID, x#, y#, z#
phy set force field velocity target ID, x#, y#, z#
phy set force field coordinates ID, type
phy set force field linear falloff ID, x#, y#, z#
phy set force field quadratic falloff ID, x#, y#, z#
phy set force field noise ID, x#, y#, z#
phy set force field position ID, x#, y#, z#
phy set force field rigid body scale ID, scale#
phy set force field soft body scale ID, scale#
phy set force field torus radius ID, radius#
phy build force field ID
phy add force field box ID, mode, x#, y#, z#, sizex#, sizey#, sizez#
phy add force field sphere ID, mode, x#, y#, z#, radius#
phy add force field capsule ID, mode, x#, y#, z#, height#, radius#
integer = phy get force field exist ( ID )
Thanks to everyone who has helped with testing and those who have given feedback over the past few days.
If you run into any problems then don't worry. We can get them sorted out
I'm also sure there's many more things that can be done in time to improve Dark Physics so please keep up with the feedback.