Build a Rotating Turret with Free Rotation Mode
Enabling Free Rotation
Check your mod configuration for cbcFreeRotationEnabled and set it to true. This allows your cannon mount to rotate without normal mechanical constraints. Also configure cbcFreeRotationMaxWeight to set a safe weight limit for unrestricted rotation—exceeding this will disable free rotation for that cannon.
Designing Your Turret Structure
Build a rotating platform using Create contraptions (bearings, shafts, etc.) to spin your entire cannon assembly. Attach the cannon mount to this rotating structure. The free rotation mode lets you command 360-degree yaw angles without hitting mechanical stops.
Scripting Smooth Tracking
Write a script that continuously reads sensor data and updates both the platform rotation and cannon pitch/yaw angles. Use small incremental angle changes rather than large jumps to create smooth tracking motion. This prevents mechanical stress and looks more natural.
Managing Weight and Performance
Keep your turret assembly under the configured weight limit to maintain free rotation capability. Heavier cannons may require higher cbcFreeRotationMaxWeight settings. Test your turret's rotation speed and responsiveness with different contraption designs to find the balance between firepower and agility.