|
|
|
|
|
|
|
|
|
|
} |
|
|
|
public Vector3 avgVelValue; |
|
|
|
public float velDeltaDistance; //distance between the goal and actual vel
|
|
|
|
float distance = Vector3.Distance(currentVel, velocityGoal); |
|
|
|
float percent = Mathf.InverseLerp(m_maxWalkingSpeed, 0, distance); |
|
|
|
velDeltaDistance = Vector3.Distance(currentVel, velocityGoal); |
|
|
|
// float percent = Mathf.InverseLerp(m_maxWalkingSpeed, 0, velDeltaDistance);
|
|
|
|
float percent = Mathf.InverseLerp(walkingSpeed, 0, velDeltaDistance); |
|
|
|
return percent; |
|
|
|
} |
|
|
|
|
|
|
|