mirror of
https://github.com/celisej567/UnitySourceMovement.git
synced 2026-09-15 20:08:52 +03:00
Add files via upload
This commit is contained in:
@@ -74,9 +74,10 @@ namespace Fragsurf.Movement {
|
||||
speed = _surfer.moveData.velocity.magnitude;
|
||||
_surfer.moveData.velocity.y = yVel;
|
||||
|
||||
float maxDistPerFrame = 1f;
|
||||
float maxDistPerFrame = 0.05f;
|
||||
Vector3 velocityThisFrame = _surfer.moveData.velocity * _deltaTime;
|
||||
float velocityDistLeft = velocityThisFrame.magnitude;
|
||||
float velocityDist = velocityThisFrame.magnitude;
|
||||
float velocityDistLeft = velocityDist;
|
||||
float initialVel = velocityDistLeft;
|
||||
while (velocityDistLeft > 0f) {
|
||||
|
||||
@@ -88,7 +89,7 @@ namespace Fragsurf.Movement {
|
||||
_surfer.moveData.origin += velThisLoop;
|
||||
|
||||
// don't penetrate walls
|
||||
SurfPhysics.ResolveCollisions (_surfer.collider, ref _surfer.moveData.origin, ref _surfer.moveData.velocity, _surfer.moveData.rigidbodyPushForce);
|
||||
SurfPhysics.ResolveCollisions (_surfer.collider, ref _surfer.moveData.origin, ref _surfer.moveData.velocity, _surfer.moveData.rigidbodyPushForce, amountThisLoop / velocityDist);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user