【发布时间】:2020-07-22 20:59:08
【问题描述】:
所以,Paper Marios jump 需要 8 帧才能达到最大跳跃高度,需要 12 帧才能回到地面。这很不寻常,知道如何用刚体快速跳起来吗?
我尝试在刚体.velocity.y > 0 时添加强制,但没有成功。
任何帮助将不胜感激,在此先感谢!
//Jump when pressing button and on ground
//jumpForce is a public float variable
if (Input.GetButtonDown("Jump") && isGrounded)
{
theRB.velocity += new Vector3(0, jumpForce, 0);
}
【问题讨论】:
-
对于gamedev.stackexchange.com 来说可能是一个更好的问题?
-
观看来自 YouTube 频道 Brackeys FIRST PERSON MOVEMENT in Unity - FPS Controller 的视频,您会在这里找到答案