BulletSim: small change to center-of-mass computation left out last commit

user_profiles
Robert Adams 2013-01-23 09:11:01 -08:00
parent a5e9c665f0
commit 13182904da
1 changed files with 8 additions and 3 deletions

View File

@ -1621,10 +1621,15 @@ public sealed class BSPrim : BSPhysObject
DetailLog("{0},BSPrim.UpdateProperties,entry,entprop={1}", LocalID, entprop); // DEBUG DEBUG DetailLog("{0},BSPrim.UpdateProperties,entry,entprop={1}", LocalID, entprop); // DEBUG DEBUG
// Assign directly to the local variables so the normal set actions do not happen
// Undo any center-of-mass displacement that might have been done. // Undo any center-of-mass displacement that might have been done.
entprop.Position -= PositionDisplacement; if (PositionDisplacement != OMV.Vector3.Zero)
{
// Correct for any rotation around the center-of-mass
// TODO!!!
entprop.Position -= PositionDisplacement;
}
// Assign directly to the local variables so the normal set actions do not happen
_position = entprop.Position; _position = entprop.Position;
_orientation = entprop.Rotation; _orientation = entprop.Rotation;
_velocity = entprop.Velocity; _velocity = entprop.Velocity;