upgrade to unity 6.1
This commit is contained in:
@@ -120,8 +120,8 @@ namespace DamageNumbersPro.Demo
|
||||
|
||||
if (currentAnimation == land) horizontal = 0;
|
||||
|
||||
Vector2 desiredSpeed = new Vector2(horizontal * speed, rig.velocity.y);
|
||||
rig.velocity = Vector2.Lerp(rig.velocity, desiredSpeed, Time.deltaTime * acceleration);
|
||||
Vector2 desiredSpeed = new Vector2(horizontal * speed, rig.linearVelocity.y);
|
||||
rig.linearVelocity = Vector2.Lerp(rig.linearVelocity, desiredSpeed, Time.deltaTime * acceleration);
|
||||
|
||||
if (horizontal > 0)
|
||||
{
|
||||
@@ -137,7 +137,7 @@ namespace DamageNumbersPro.Demo
|
||||
if(Time.time > lastJumpTime + 0.2f && Time.time > lastAirTime + 0.1f)
|
||||
{
|
||||
lastJumpTime = Time.time;
|
||||
rig.velocity = new Vector2(rig.velocity.x, jumpStrength);
|
||||
rig.linearVelocity = new Vector2(rig.linearVelocity.x, jumpStrength);
|
||||
|
||||
//Jump:
|
||||
currentAnimation = jump;
|
||||
|
||||
Reference in New Issue
Block a user