Yes ideally you should reach the starting point again. Ideally adding 10,000 0.0001's should result in a value of 1.0, unfortunately it does not work that way. I did create a test script with a 16 quant sphere attached to (0,0,0) and starting 464 quants along the x-axis. It lost about half a degree per minute of swing time and still looked acceptable after 5 minutes. I can see though, why you would need a perfect swing for your MMUSCLE education. Maybe you can fake it by re-initializing the sphere after each cycle- just check whether the maximum displacement has been reached and call the init function again.
Here's the code used:
Code:
action InitSwing {
phent_settype(my, PH_RIGID, PH_SPHERE);
phent_setmass(my, 0.01, PH_SPHERE);
phent_setelasticity(my, 0, 0);
phent_setdamping(my, 0,0);
phent_setmaxspeed(my, 99999,99999);
var cons;
cons= phcon_add(PH_BALL, my, 0);
phcon_setparams1(cons, vector(0,0,0), nullvector, nullvector);
ph_setgravity(vector(0,0,-380));
}
Some more information on how the update is progressing:
* Add some sort of softbody physics based on springs
The beta will have experimental water surfaces that exhibit spring-mass like behavior.
* auto rest feature
Implemented.
* fix wheel bending
Done. (Reduces wheel bending in most cases- you can still make them bend by applying large forces).
* Movement of a vehicle using the physics engine on terrain. Currently when a vehicle moves over a terrain it is tossed all over the place
There was a bug which caused collisions to be missed on terrain, e.g. only three of four wheels would report terrain contacts at any given time.
* Allow events to be used with entities enabled in the physics engine.
What about EVENT_FRICTION? Which event types do you need?