Using a mathematical formula to define player speed
问题 I'm making simple game in which the player is moved by adding force to him. However, I don't want his acceleration to be constant - I want it to vary depending on the current speed. I made simple acceleration script to do this but it doesn't achieve the desired effect: float acceleration { get { return speed/inversedAcceleration; } } void FixedUpdate () { rb.AddForce(transform.forward * speed); if (speed < maxSpeed) speed += acceleration * Time.deltaTime; } New way that I also tried: float