📌  相关文章
📜  void Jump() { if (isGrounded) { rb.velocity = new Vector3(rb.velocity.x, 0, rb.velocity.z); rb.AddForce(transform.up * jumpForce, ForceMode.Impulse); } } - 任何代码示例

📅  最后修改于: 2022-03-11 14:55:09.834000             🧑  作者: Mango

代码示例1
void Jump()
     { 
         if (isGrounded)
        {
            rb.velocity = new Vector3(rb.velocity.x, 0, rb.velocity.z);
            rb.AddForce(transform.up * jumpForce, ForceMode.Impulse);
        }
     }