A short guide regarding the creation of commander turrets (periscopes, or whatever).
Before We Begin…
Before we begin, I would highly suggest you to watch this official ER2 SDK video, because commander turrets are, more or less, just, well, turrets, albeit the ones that don’t shoot.
But other core principles are exactly the same. I will mainly focus on something that is unique to periscopes.
Probably Something You Came Here For
First of all, select the object you want to serve as the commander turret (whether mesh or an empty- it doesn’t really matter, some tanks in the vanilla game don’t even have visibly moving periscopes). Right-click on it and select ER2 MODS > Vehicles > Turrets > Commander.
Now, select the newly created commander turret. The only new setting compared to the standard ‘shooting’ turret is the Align Periscope setting. What it does is that it forces the selected vehicle viewport (observation device, however you might call it) to follow your camera instantly, independently from the ‘outside’ part of your periscope that is controlled by the Rotation Speed setting.
While nothing is stopping you from just parenting this viewport to the Y or X axis, and it will rotate just fine, you will notice that even if you will set the rotation speed to 100, it will still not move as quickly as it does on vanilla vehicles like Shermans. So, that’s it really, ‘Align Periscope’ simply allows you to move the periscope viewport as quickly as you can move your mouse, but it will, as far as I know, limit your movement to Y axis.
The other settings should be similar to the ones on normal turrets, although should you use Align Periscope feature, then Y axis- and X axis-related settings will apply only to the parts that you want to serve as the external indicator of your periscope and not to the part that you control in first person.
Other than that, that’s it. Congratulations on setting up a periscope for your vehicle.