Turrets on vessels drawing
Turrets on vessels drawing
How does OpenRA draw the turrets on vessels like the Cruiser? How does it adjust the turret drawing for the Cruisers rotation? The turrets themselves are loose files and not part of the graphics (unlike turrets on tanks).
http://blogs.ijw.co.nz/chris/index.php/ ... sitioning/ may be outdated already though.
That had a number of limitations, and was replaced ~6mo ago with proper 3D positioning in https://github.com/OpenRA/OpenRA/pull/2887. Take a look at the Turreted trait implementation to see how it is used.Cmd. Matt wrote: ↑http://blogs.ijw.co.nz/chris/index.php/ ... sitioning/ may be outdated already though.
The Position method in Turreted.cs would be a good place to start, and then look up the definitions of the functions it uses (and the functions they use).
It is pretty much all 3D vector stuff, so you may have some trouble. You may be better off looking at the old code implementation described in that blog post, which is much simpler and probably good enough for your static map previews.
It is pretty much all 3D vector stuff, so you may have some trouble. You may be better off looking at the old code implementation described in that blog post, which is much simpler and probably good enough for your static map previews.