現時点では、画面に立方体が表示されていますが、現在は前進していますが、キーボードのキー 'd' を押して離したときのみです。それは十分に速く更新されていないようです。
if (Input.GetKeyDown("d")){
currentSpeed.x = 100;
rigidbody.AddRelativeForce(accelaration, 0, 0);
}
何か提案はありますか?
ありがとう、
カルム
現時点では、画面に立方体が表示されていますが、現在は前進していますが、キーボードのキー 'd' を押して離したときのみです。それは十分に速く更新されていないようです。
if (Input.GetKeyDown("d")){
currentSpeed.x = 100;
rigidbody.AddRelativeForce(accelaration, 0, 0);
}
何か提案はありますか?
ありがとう、
カルム
これは機能している可能性があります。
if(Input.GetKey(KeyCode.LeftArrow))
{
transform.position+=-transform.right*speed;
}
if(Input.GetKey(KeyCode.RightArrow))
{
transform.position+=transform.right*speed;
}
if(Input.GetKey(KeyCode.UpArrow))
{
transform.position+=transform.forward*speed;
}
if(Input.GetKey(KeyCode.DownArrow))
{
transform.position+=-transform.forward*speed;
}