Page 1 of 1

Some way to "know" a train is getting stopped by something

Posted: Mon Feb 18, 2019 10:53 pm
by Godmave
I would like to know if a train (not a single entity) is getting stopped by/colliding with, for instance a player, standing in it's way. Or an event when it is colliding with something.
At the moment I check the speed and compare it to another speed. But that causes problems at low speeds where I can't clearly calculate if the speed difference is just normal acceleration or a sudden stop.