diff --git a/Assets/Scripts/Dobber.cs b/Assets/Scripts/Dobber.cs index 1174dfc..5e84e24 100644 --- a/Assets/Scripts/Dobber.cs +++ b/Assets/Scripts/Dobber.cs @@ -52,7 +52,7 @@ public class Dobber : MonoBehaviour void Move() { //new Vector3 for calculating movement values - Vector3 move = new Vector3(0, 0, moveVertical * 100 * moveSpeed * Time.deltaTime); + Vector3 move = new Vector3(0, rb.velocity.y, moveVertical * 100 * moveSpeed * Time.deltaTime); Quaternion rotate = Quaternion.Euler(transform.rotation.x, moveHorizontal * 100 * turnSpeed * Time.deltaTime, transform.rotation.z); //here we apply the movement related to the rotation of player rb.velocity = transform.right * move.x + transform.up * move.y + transform.forward * move.z;