Apply positional calibration force to center of mass
This commit is contained in:
@ -640,7 +640,7 @@ namespace RageCoop.Client
|
||||
// localRagdoll
|
||||
var force = Velocity - MainPed.Velocity + 5 * dist * (predicted - MainPed.ReadPosition());
|
||||
if (force.Length() > 20) force = force.Normalized * 20;
|
||||
MainPed.ApplyForce(force, default, ForceType.InternalImpulse);
|
||||
MainPed.ApplyWorldForceCenterOfMass(force, ForceType.InternalImpulse, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -174,7 +174,7 @@ namespace RageCoop.Client
|
||||
if (distSquared > 0.03 * 0.03)
|
||||
{
|
||||
if (IsTrain || distSquared > 20 * 20) MainVehicle.Velocity = Velocity + cali;
|
||||
else MainVehicle.ApplyForce(cali, default, ForceType.InternalImpulse);
|
||||
else MainVehicle.ApplyWorldForceCenterOfMass(cali, ForceType.InternalImpulse, true);
|
||||
}
|
||||
|
||||
Quaternion predictedQuat = updated ? Quaternion :
|
||||
|
Reference in New Issue
Block a user