A method for controlling a crane component of a tower crane in proximity of obstacles at a worksite, the tower crane comprising a mast, a rotating bed coupled to the mast, a boom (1110, 2110) mounted on the rotating bed, and a hook block connected to the boom (1110, 2110), the method executable by a computing device having a processor and a memory, the method comprising: saving, in the memory, coordinate data representing a coordinate system at the worksite having an origin at a base of an axis of rotation of the rotating bed and fixed relative to the mast, wherein the boom (1110, 2110) is rotatable on the axis of rotation; saving, in the memory, obstacle data representing a forbidden volume in the coordinate system; saving, in the memory, crane component data representing the location of the crane component; and limiting movement of the crane component, by the computing device, to avoid the crane component (1110, 2110, 1150) entering the forbidden volume, characterized in that: the crane component to be controlled is the hook block; the crane component data includes hook block data represented by a hook block model (2169, 4169) in the coordinate system to model the hook block, the method further comprising: determining, by the computing device, a hook block proximity vector (2473, 4473) using the coordinate data, the obstacle data and the crane component data, the hook block proximity vector (2473, 4473) representing a minimum distance between a point on the hook block model (2169, 4169) and the forbidden volume, and limiting movement of the crane component comprises limiting movement of the hook block based on the hook block proximity vector (2473, 4473) and a threshold distance, and the limited movements are selected from one of: swing-left, swing-right, boom-up, boom-down, and hook-down movements, or swing-left, swing-right, trolley-in, trolley-out, and hook-down movements. saving, in the memory, coordinate data representing a coordinate system at the worksite having an origin at a base of an axis of rotation of the rotating bed and fixed relative to the mast, wherein the boom (1110, 2110) is rotatable on the axis of rotation; saving, in the memory, obstacle data representing a forbidden volume in the coordinate system; saving, in the memory, crane component data representing the location of the crane component; and limiting movement of the crane component, by the computing device, to avoid the crane component (1110, 2110, 1150) entering the forbidden volume, characterized in that: the crane component to be controlled is the hook block; the crane component data includes hook block data represented by a hook block model (2169, 4169) in the coordinate system to model the hook block, the method further comprising: determining, by the computing device, a hook block proximity vector (2473, 4473) using the coordinate data, the obstacle data and the crane component data, the hook block proximity vector (2473, 4473) representing a minimum distance between a point on the hook block model (2169, 4169) and the forbidden volume, and limiting movement of the crane component comprises limiting movement of the hook block based on the hook block proximity vector (2473, 4473) and a threshold distance, and the limited movements are selected from one of: swing-left, swing-right, boom-up, boom-down, and hook-down movements, or swing-left, swing-right, trolley-in, trolley-out, and hook-down movements. the crane component to be controlled is the hook block; the crane component data includes hook block data represented by a hook block model (2169, 4169) in the coordinate system to model the hook block, the method further comprising: determining, by the computing device, a hook block proximity vector (2473, 4473) using the coordinate data, the obstacle data and the crane component data, the hook block proximity vector (2473, 4473) representing a minimum distance between a point on the hook block model (2169, 4169) and the forbidden volume, and limiting movement of the crane component comprises limiting movement of the hook block based on the hook block proximity vector (2473, 4473) and a threshold distance, and the limited movements are selected from one of: swing-left, swing-right, boom-up, boom-down, and hook-down movements, or swing-left, swing-right, trolley-in, trolley-out, and hook-down movements. determining, by the computing device, a hook block proximity vector (2473, 4473) using the coordinate data, the obstacle data and the crane component data, the hook block proximity vector (2473, 4473) representing a minimum distance between a point on the hook block model (2169, 4169) and the forbidden volume, and limiting movement of the crane component comprises limiting movement of the hook block based on the hook block proximity vector (2473, 4473) and a threshold distance, and the limited movements are selected from one of: swing-left, swing-right, boom-up, boom-down, and hook-down movements, or swing-left, swing-right, trolley-in, trolley-out, and hook-down movements. swing-left, swing-right, boom-up, boom-down, and hook-down movements, or swing-left, swing-right, trolley-in, trolley-out, and hook-down movements.