Commit 22105902 authored by Tobias Meuser's avatar Tobias Meuser
Browse files

Fixed display bug for very large scenarios

parent fbfd7010
......@@ -289,7 +289,7 @@ public class VehicleMovementModel implements MovementModel, EventHandler, Future
SimLocationActuator component = requestSimActuator(vehicle);
if (scenarioHeight != -1) {
component.updateCurrentLocation(new PositionVector(position.getX() / SCALING_FACTOR, scenarioHeight - position.getY() / SCALING_FACTOR));
component.updateCurrentLocation(new PositionVector(position.getX() / SCALING_FACTOR, Math.min(scenarioHeight, height) - position.getY() / SCALING_FACTOR));
} else {
// This would be vertically mirrored
component.updateCurrentLocation(new PositionVector(position.getX() / SCALING_FACTOR, position.getY() / SCALING_FACTOR));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment