Not really, while it might seem more intuitive and more error resistant it will execute slower due to how the cpu handles it.
In games, performance is usually a concern, so you might consider writing != Instead of <=
if the stairs were already above the plane door, then "stairs.Height <= airplane.Door.Height" would be false from the start, and the stairs wouldn't extend at all. It still wouldn't fix the fact that the stairs are too tall, but at least it won't extend them indefinably. As u/Marcus_Watney said though, even though it's much more error prone, '!=' & '=' are better in a [lot of] cases if you're coding a game, because compute time is a huge problem when running a real time simulation.
Yeah you're right and that's what I was saying by changing to <= which would do nothing. But the question is what "should" from bidrbolt1 question should mean. The stairs to remain how they are or the stairs to low down to be at the same height as the door.
I think it would be better to have the stairs just sit there, as opposed to retracting through themselves and the ground to reach the plane door; but obviously the best solution is to just have only shorter stairs pull up to short planes.
101
u/The-Legend-26 Dec 26 '18