What controls the gun barrels position on a unit in the game?
There is no connector from what I have seen on the turret .pie
gun barrel question
Re: gun barrel question
iirc, the barrel pie (gn*.pie) has the connector, and the barrel elevates circularly around the connector. also, i think it only rotates about the x axis (up and down) and the x coordinate of connector has no effect, though by convention, it's put at the barrel's center along the x axis.
Re: gun barrel question
But, how do I control where the barrel will get placed on the turret? If I wanted it to point out the back, how would I do that?
Re: gun barrel question
the origin (0,0,0) for the barrel pie corresponds exactly with the origin for the turret when at rest. pie slicer lets you superimpose multiple pie files on top of each other -- grab any gn*.pie and its corresponding tr*.pie and have pie slicer load them both -- when they're superimposed, you'll see what i mean.
Re: gun barrel question
ah ok. that makes sense to me. If the turret is 20 units away from origin, the barrel must start 20 units away from origin and they will meet up correctly.
Re: gun barrel question
exactly. however, remember that the turret rotates around its origin while the barrel rotates around the connector within the barrel pie, so if the turret is 20 units away from the origin, it'll appear to be floating in air when you look at it in-game, but then, i'm assuming you were just made that up as an example.