It seems as if a vehicle with a turret on, if the turret sticks above roof level, can be used as a static turret, and it's effectively invulnerable from outside the base. Is there a way to prevent the turrets from being used like this and still have them function without the player in the car? Maybe a way to prevent a car with a too high turret from getting in the door?
Maybe an issue or maybe not?
I can look I to adding a collider to the turret to prevent sticking through obstacles in most cases.
That would be pretty cool. It became an issue on one of my servers after someone figured out they could park a herd of cars with turrets out the roof and have a pretty awesome roof defense, requiring a bit of a nerf. Now the peasants are threatening to start rioting if we pull your awesome plugin.
Whanging in a collider would probably fix this issue.
One option is to only allow turrets on flat bed modules.
Merged post
I experimented with adding a collider (changing the layer from Vehicle_Detailed to Vehicle_World), but there were some issues.
One issue, when the car was driven quickly toward a point where a roof collided with the turret, the turret stuck up above the ceiling, lifting the car in the process, making the car no longer able to be moved. While I suppose that does mitigate the exploit, it could be unfair punishment for players who weren't intending to exploit.
Another issue, while on a lift, the vehicle's rigid body is set to kinematic, so the collider has no effect. I could disable turret targeting while the vehicle's rigid body is kinematic, but there was a secondary issue, which is that you can't really remove the car from the lift. It would be easy for players to accidentally encounter this problem, by placing a turret onto a car while it's on a lift.
I will explore further mitigations, such as disabling turret targeting while the turret is clipping into something.