Mob pull spin fix (#37256)
Angular Friction applied to Kinematic Controllers
This commit is contained in:
committed by
GitHub
parent
6d65039f3c
commit
5dbd40c9dd
@@ -118,8 +118,11 @@ namespace Content.Shared.Friction
|
||||
// You may think you can just pass the body.LinearVelocity to the Friction function and edit it there!
|
||||
// But doing so is unpredicted! And you will doom yourself to 1000 years of rubber banding!
|
||||
var velocity = body.LinearVelocity;
|
||||
var angVelocity = body.AngularVelocity;
|
||||
_mover.Friction(0f, frameTime, friction, ref velocity);
|
||||
_mover.Friction(0f, frameTime, friction, ref angVelocity);
|
||||
PhysicsSystem.SetLinearVelocity(uid, velocity, body: body);
|
||||
PhysicsSystem.SetAngularVelocity(uid, angVelocity, body: body);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user