Updated Unity to unity 6.
This commit is contained in:
@@ -169,7 +169,7 @@ namespace Assets.Scripts.Player
|
||||
|
||||
public void move(Vector3 input)
|
||||
{
|
||||
if(gameObject.GetComponent<Rigidbody>().velocity.y <= 0.1f && gameObject.GetComponent<Rigidbody>().velocity.y >= -0.1f){
|
||||
if(gameObject.GetComponent<Rigidbody>().linearVelocity.y <= 0.1f && gameObject.GetComponent<Rigidbody>().linearVelocity.y >= -0.1f){
|
||||
jumpFrameCounter++;
|
||||
}
|
||||
|
||||
@@ -181,7 +181,7 @@ namespace Assets.Scripts.Player
|
||||
{
|
||||
if (canJump)
|
||||
{
|
||||
gameObject.GetComponent<Rigidbody>().velocity = new Vector3(0, 5, 0);
|
||||
gameObject.GetComponent<Rigidbody>().linearVelocity = new Vector3(0, 5, 0);
|
||||
audioHandler.playJump();
|
||||
canJump = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user