No announcement yet.

Why is it decelerating when it shouldn't?

  • Filter
  • Time
  • Show
Clear All
new posts

    Why is it decelerating when it shouldn't?

    Hello, i want to make a advanced acceleration for my plane. Not only "boost or no boost".

    So i have 3 states, braking, boosting and crusing (crusing = no input).

    Normal speed (not pressing anything = max speed (max engine speed without booster).)
    • Braking = min speed
    • Boosting = boost speed (should decelerate with the same speed it accelerates)
    • Boost (Bool) = The "boost" boolean tells me if i have enough boost loaded to use it. True = i can use it, false = i can't use it. The bool can be used as input.
    • Engine_Boost_Acceleration = This is the boost acceleration i want to use. I have calculated the acceleration speed to go from A => B in XY Seconds "Engine Boost Acceleration".
    I deleted everything what i had and now i start the 4th time from scratch and now i have this here:

    The issue now is, that it keeps decelerating even under "speed_max".
    It should decelerate from any speed above "speed_max" down to the "speed_max".
    This name might be bit confusing but "speed_max" is not the max speed the plane can fly but the max speed the plane can fly without using the boost.

    To make it bit easier to understand it, the "speed_max" is the speed it should fly without any input. If i go AFK the plane should have the "speed_max(1800)" speed. After pressing Spacebar it should accelerate from "speed_max" -> "speed_boost" and then if the "Boost tank is empty" or if not pressing the spacebar it should decelerate down to "speed_max". When pressing "S" the speed should go from "speed_max" to "speed_min".

    Can someone help me? Why does it still decelerate even if i set there the "Speed > Speed_max" it still keeps decelerating.

    I got it can be deleted.