|
@@ -766,7 +766,7 @@ void SoftBodyMotionProperties::UpdateSoftBodyState(SoftBodyUpdateContext &ioCont
|
|
// Calculate linear/angular velocity of the body by averaging all vertices and bringing the value to world space
|
|
// Calculate linear/angular velocity of the body by averaging all vertices and bringing the value to world space
|
|
float num_vertices_divider = float(max(int(mVertices.size()), 1));
|
|
float num_vertices_divider = float(max(int(mVertices.size()), 1));
|
|
SetLinearVelocityClamped(ioContext.mCenterOfMassTransform.Multiply3x3(linear_velocity / num_vertices_divider));
|
|
SetLinearVelocityClamped(ioContext.mCenterOfMassTransform.Multiply3x3(linear_velocity / num_vertices_divider));
|
|
- SetAngularVelocityClamped(ioContext.mCenterOfMassTransform.Multiply3x3(angular_velocity / num_vertices_divider));
|
|
|
|
|
|
+ SetAngularVelocity(ioContext.mCenterOfMassTransform.Multiply3x3(angular_velocity / num_vertices_divider));
|
|
|
|
|
|
if (mUpdatePosition)
|
|
if (mUpdatePosition)
|
|
{
|
|
{
|