コード例 #1
0
    void Movement()
    {
        Vector3 targetVelocity = transform.TransformDirection(new Vector3(inputManager.GetMovementInputHorizontal(), 0, inputManager.GetMovementInputVertical()) * movementSpeed);

        targetVelocity.y  = playerRb.velocity.y;
        playerRb.velocity = targetVelocity;
    }