     float a;
     float b;
     float c;
+    bool hasHitPlane;
     
     Component::Physics @minecartPhysics;
     Component::Physics @stopPhysics;

        speed = 20.0f;
        stopTime = 0.0f;
        endTime = 7.5f;
        
        // Calculate second grade equation.
        float t = endTime;

    void Update(float deltaTime){
        self.position.z -= speed*deltaTime;
        
        // Braking phase
        if (hasHitPlane && stopTime < endTime){
            stopTime += deltaTime;
            float t = stopTime;
            float zPos = a * t * t * t / 3.0f + b * t * t / 2.0f + c * t;
            self.position.z = 450.0f - zPos;
        }
        // Stopping phase
        else if (stopTime >= endTime && !trigger) {
            self.position.z = 400.0f;
            speed = 0.0f;
        }
        // Start again after lever has been pulled
        else if (trigger){
            if (speed < 20.0f)
                speed += 0.0664f;
        }
    }
    
    void ReceiveMessage(int signal){
