Unity3D: Gun Turret Rotation (Download in Description)

Опубликовано: 15 Май 2026
на канале: Why485
10,962
265

Repository and standalone package can be found here:
https://github.com/brihernandez/GunTu...

For some years now I’ve been re-using code that I wrote back in my first major project, Unity Combat Space Sim. Since then, I’ve been sloppily copy and pasting the most recent use of it, then tearing out a bunch of project-specific code any time I needed a turret. It was a silly process, and I re-use it so much that I wanted to create a “canonical” version of the turret rotation code so that I could just drop it into any project and then start developing from there.

This specific version of the turrets has the rotation code, as well as has been polished to make the code easier to use, easy to just plug into a project, has built in visualizations for turret limits, and asymmetrical traverse limits.

Music is "Soda River" by OrangeCoffee