Page 1 of 1
How to make a rotating cannon on a tank?
Posted: Sat Jun 14, 2008 2:13 pm
by Redline
Hello everybody.
I have forgotten how i make a rotating cannon on a tank .
Can someone of you help me ?
I hope all of you have understood my question.
So pls help me.
Thank you in advance.

Re: How to make a rotating cannon on a tank?
Posted: Sat Jun 14, 2008 4:10 pm
by FragMe!
Have a look at my post in this topic see if it helps (assuming you mean a manned turret)
http://www.gametoast.com/forums/viewtop ... 36&t=14335
Re: How to make a rotating cannon on a tank?
Posted: Sun Jun 15, 2008 7:39 am
by Redline
No manned turret
Ok let's have a look on my model.
And now you see what i mean.
I hope you can help me now.
EDIT
Can really nobody help me ?

Re: How to make a rotating cannon on a tank?
Posted: Sun Jun 15, 2008 9:27 am
by MercuryNoodles
That
is a turret on that tank, and they're typically manned.

So, go look a that thread, since it has info relevant to the question.
Re: How to make a rotating cannon on a tank?
Posted: Sun Jun 15, 2008 9:54 am
by Taivyx
Dunno if that's possible on this game engine, considering that usually when you turn the mouse, the whole vehicle turns in this engine.
The easiest way is just to make the main cannon controlled by a gunner, and primary position of the vehicle is a driver.
Re: How to make a rotating cannon on a tank?
Posted: Sun Jun 15, 2008 10:23 am
by Redline
Yes, but first must I know how i get the cannon ready.
All the other thread's don't help me.
I think it has to do with nodes, because i found in the odf of the cis tank this:
( This is the Main gun of the AAT)
FLYERSECTION = "TURRET1"
VehiclePosition = "common.vehiclepositions.gunner"
//FirstPerson = "cis\cissccam;cis_1st_cockpit_securitycam"
TurretNodeName = "Gun_Body" <-- Here to exsample and...
PitchLimits = "-40.0 20.0"
YawLimits = "-180.0 180.0"
PitchTurnFactor = "0"
PCPitchRate = "15"
TurnRate = "1.8"
TurnFilter = "10"
PitchRate = "0.5"
PitchFilter = "10"
PitchDamp = "10"
BarrelNodeName = "recoil_3" <-- and here
BarrelRecoil = "0.75"
FirePointName = "hp_cannon_1"
EyePointOffset = "0.0 2.0 -1.75"
TrackCenter = "0.0 1.0 -2.0"
TrackOffset = "0.0 0.0 3.0"
TiltValue = "10"
Have this two nodes a significance for my cannon?
And how must i place it in xsi, so that it will work in sw-bf 2 ?
hmmm... I think that I am on the right way.
Re: How to make a rotating cannon on a tank?
Posted: Sun Jun 15, 2008 1:57 pm
by Blade
I don't know a whole lot about modeling, but as for it being impossible, look at the AT-ST's head. It can turn on its own. However, the body does eventually catch up with the head, so... I know that partial turns are possible (no idea how

), but I don't think a completely independent turret (controlled by the driver) is conceivable/possible.
Re: How to make a rotating cannon on a tank?
Posted: Sun Jun 15, 2008 6:03 pm
by Grev
I woulk look into the odf of the ATT, since it has a turret on top that rotates 360.
Re: How to make a rotating cannon on a tank?
Posted: Sun Jun 15, 2008 8:53 pm
by Caleb1117
I honestly have no real idea, but I theorize, that if one placed a null, at the point where the wanted the turret to turn at, and made it the child of the turret? Or maybe the other way around...
They could then define the null in the ODF
TurretNodeName = "Gun_Body" <-- Here to exsample and...
PitchLimits = "-40.0 20.0"
YawLimits = "-180.0 180.0"
And since if the null was a parent to the turret, it should control it, and ... I don't know, just a theory.
Re: How to make a rotating cannon on a tank?
Posted: Sun Jun 15, 2008 10:02 pm
by FragMe!
That is correct, a null at the pivot point for turning the turret with the actual turret model a child of the null
So tree in XSI explorer would look something like this
Code: Select all
dummyroot
mainmodelbits
gun_body (this is the null)
turret
barrel_body (this is another null to tilt the barrel up and down goes at the start of the barrel where it meet the turret)
barrel
hp_fire (this is another null that goes at the business end of the barrel)
The barrel_body null can also be used for recoil. Of couse since it will move all the collisions for the turret and barrel need to collison primitives and they would have to go at the same location in the tree as thier respective parts.
And as I mentioned earlier you will also have to make a .option file or the msh or the turret won't move.
Re: How to make a rotating cannon on a tank?
Posted: Tue Jul 01, 2008 10:05 am
by Redline
Ok thx for the help all, but now I have another problem.
The problem is that I must know how I make the control for the cannon and the tank.
The cannon must let move with the mouse and the tank with the buttons W,A,S and D
I have tried many ways to make it real, but I am failed.
So can someone help me with my problem?
At the best I post the Script of my Tank.
Re: How to make a rotating cannon on a tank?
Posted: Tue Jul 01, 2008 10:18 am
by elfie
Not to bump but are you ever going to release that tank? It is a great model and I can really use it for one of the maps I am working on!

Re: How to make a rotating cannon on a tank?
Posted: Tue Jul 01, 2008 10:28 am
by obiboba3po
LOL elfie! actually, id like to have it too please

(and have you fixed the thing with the turret?)
Re: How to make a rotating cannon on a tank?
Posted: Tue Jul 01, 2008 10:29 am
by Teancum
Redline wrote:Ok thx for the help all, but now I have another problem.
The problem is that I must know how I make the control for the cannon and the tank.
The cannon must let move with the mouse and the tank with the buttons W,A,S and D
I have tried many ways to make it real, but I am failed.
So can someone help me with my problem?
At the best I post the Script of my Tank.
In FragMe!'s post above, did you create the turret setup like he pointed out? What did you name each of the nulls and objects?
Re: How to make a rotating cannon on a tank?
Posted: Sat Jul 05, 2008 8:34 am
by Redline
Yes, but the problem is the control of sw bf 2.
How can I change the control so that I can move the turret with the mouse.
And how can I change the control of the tank, so that it can move with the buttons A:( Left), D:( right) ,W:(forward) and S:(backward)?
In FragMe!'s post above, did you create the turret setup like he pointed out? What did you name each of the nulls and objects?
Yes and here are some names of my nulls and turrets:
First: NULL: gun_body ->Object: turret
Second:NULL: gun ->Object:barrel
PS:
My first sucess was that I could move the main turret with a gunner, but not with the pilot.
I am confused.

Re: How to make a rotating cannon on a tank?
Posted: Sat Jul 05, 2008 10:43 am
by Aman/Pinguin
I think this already belongs into the SWBF2 Modding Forum.
