Jump to content
Sign in to follow this  
General Barron

Possible solution for multi-turret tanks

Recommended Posts

Just an idea on how to make multi-turret/gunner tanks and ground vehicles work. Obviously this can be done via a setpos/setdir loop with ships, but the problem is, with ground vehicles, their pitch changes according to the terrain, so this doesn't work well with them. So I'm thinking: how about using setvelocity instead?

Lets say, for example, you were to make a MG that can rotate separate from the turret of a tank. Could you model/configure that MG to actually "touch" the ground (invisibly), and thus be able to "roll" with the tank? The idea would then be, you have a constant setdir/setvelocity loop that just "rolls" the turret wherever the tank goes. Thus, when the tank rolls up a slope, the turret also tilts, since the turret is "rolling" as well.

That's the short of it, I guess. I suppose the idea rests on a bunch of "unknowns" for me though, that is, whether or not you could actually model a turret to work in this way. Or has a better way been found to work this problem? Just some thoughs.

Share this post


Link to post
Share on other sites

and if the tank makes a jump? wink_o.gif

With the diffrence in mass, etc, the behaviour etc of the turrents cant be thesame.

unlike boats, tanks move FAR more, so it wouln't look pretty either way wink_o.gif

Share this post


Link to post
Share on other sites

u also forget that the tank will tilt as soon as it will touch a slope while the "rolling turret" will only tilt when it touches it. Thus it appears to be straight on a tilted tank til about half the tank is on the hill.

Share this post


Link to post
Share on other sites

There is no sensable way to do it, it wouldn't match up right and, setvelocity will ignore the bumpyness of the terrian, another problem would be that the MG wouldn't follow the tank if the pitch of the tank changed irrelevent to the ground, for example, jumps, and getting bounced around by explosions, etc... Also, there would be no way to make it follow the turret, you would have to mount it on the exact axis of the turret, or else when the turret moves, your MG is floating somewhere else.

  • Like 1

Share this post


Link to post
Share on other sites

I think your slant is appropriate barron

there are collision problems of course through the geometry lod.

what I have been trying is to "mimic" the atributes of the main res lods of the "main" model, with faceless vertexes and applying the same geometry. therefore essentially creating an "invisible" vehicle exept for the "2nd" weapon" but I think the main funcionality problem with this is that there must be an "attendant" ai for this approach to work and AI does not like to be in the same ([x,y,z]) place as another AI.

but it is a logicall approach

you would have to also keep all the pionts in the same place as the "main" model. IE memory,Res etc

Share this post


Link to post
Share on other sites

I think AKK has explained it better than I have. Basically you would need an invisible "vehicle" under the turret that was the same shape as the normal vehicle. That would eliminate the problem that gandalf and Soul_Assassin are talking about. I would think that setting the mass of this turret to be equal to the "real" vehicle would prevent problems when going off of jumps. There might be problems with when the tank is hit by a explosion, but this might be solvable via a hit eventhandler and some good-ol setpos. I forgot about the rotation of the turret, but this idea isn't specifically tied to MG's on top of tank turrets.

Share this post


Link to post
Share on other sites

lol@offtime...that may be a long wait.

One possible way that i tested:-

In 02, set the model of your attaching vehicle to >properties>on surface.

Once u attached the vehicle, the attaching vehicle will follow every turn and height of the terrain.

Only drawback is that the entire model will always remain 90 degree angle even if the slope is 45 degree - so i guess it would be best to use only small parts as attaching vehicle.

would love to hear another way, though i heard the mapfact team has a terrain following script that make choppers fly NOE - neck of earth - at the given height.

Share this post


Link to post
Share on other sites

badlink... I have older verssion that the gmgunner can't be killed easilly even after the tank gets hosed.

Share this post


Link to post
Share on other sites
Quote[/b] ]badlink...

the link it's right, only the site is strongly bandwith limited, so

maybe after two or three people have downloaded it, there's no

more space for the others. I may post the file on yousendit.com

if someone's interested, though.

Quote[/b] ]...the gmgunner can't be killed easilly even after the tank gets hosed.

It's really an old version you have...

Quote[/b] ]In 02, set the model of your attaching vehicle to >properties>on surface.

Maybe using a roadway lod placed on top of the tank's main turret

would help. I've experimented a little, but I've not enough knowledge

of O2 to do something good.

Quote[/b] ]There might be problems with when the tank is hit by a explosion, but this might be solvable via a hit eventhandler and some good-ol setpos. I forgot about the rotation of the turret,

I used two GL to keep the turret in place in EVERY situation and

it works fine (perfectly on flat ground or over not too steep hills).

Quote[/b] ]Also, there would be no way to make it follow the turret, you would have to mount it on the exact axis of the turret, or else when the turret moves, your MG is floating somewhere else.

Not true. See above.

Share this post


Link to post
Share on other sites

maybe a possible solution to override the tilting stuff

first model the 2d turret on hte tank as usual

then copy nd paste it into a new file

and add landcontact points just as the height as the tank ha

cfg as seperate m2 gun and set it on the tanks 0 pos

Share this post


Link to post
Share on other sites

I tired the same thing, appropriate land contact points for the turret, then setposing it onto the tank. I could not get it to work, the regular BIS MG will tilt with the terrain, but only when it's stationary. As soon as I placed it in a loop, it stopped responding to the change in terrain.

I still think it could  work, but I know next to nothing about addon configs and O2, so I gave up on the idea.

Share this post


Link to post
Share on other sites

Work-in-Progress

Multi-turret Boat/Ship using Sa8Gecko's method (used on his M1 test)

This is the standard Mirage PB armed with forward Multi-purpose HMG, with a working Missile turret added to the rear.

Although the "land-tilt" affect still effects the added turret (lower half only);

1 - Its a boat .... so its mostly on "level ground" biggrin_o.gif

2 - The lower half only tilts to the land and as its a cone shape, it can barely be seen.

Still a couple of things to tidy, but the principle for ships seems very workable. (excuse my ignorance, I guess this could be the same techneque used by Col. Klink )

Crow7_1.jpg

Crow7_2.jpg

.

Share this post


Link to post
Share on other sites

Does VBS have a second turret working? I read somewhere that it did but that was ages ago and i can't find the post that mentioned it.

Anyway i was wondering if it was scripted or part of the engine?

Share this post


Link to post
Share on other sites

im not 100% sure about it

afaik it still needs to be scripted

but as vbs1 is diffrent form ofp i cant really tell

but it seems the the uscm 1 module ah1z super cobra has

moving sensor copula as aive seen it tillt up and down

but its possible to make two huds and comapasses on planes /choppers

Share this post


Link to post
Share on other sites
I tired the same thing, appropriate land contact points for the turret, then setposing it onto the tank. I could not get it to work, the regular BIS MG will tilt with the terrain, but only when it's stationary. As soon as I placed it in a loop, it stopped responding to the change in terrain.

I still think it could  work, but I know next to nothing about addon configs and O2, so I gave up on the idea.

Setpos won't adjust an object to the terrian, especialy when looped. Setvelocity will, but if you try to loop setdir for the direction of it, then the MG will NOT follow terrian, just a setdir thing.

Share this post


Link to post
Share on other sites
Quote[/b] ]Setpos won't adjust an object to the terrian, especialy when looped. Setvelocity will, but if you try to loop setdir for the direction of it, then the MG will NOT follow terrian, just a setdir thing.

Yeah it's looking that way. Sa8Geko pointed out that the Mi26 used a combination of SetPos and SetVelocity for it's cargo scripts. So we thought that might work, but not for land based vehicles it seems sad_o.gif

Share this post


Link to post
Share on other sites

Well hellocopters don't follow the terrian, in fact, the Mi26 stayed relativly level during flight, so there wouldn't have been the need for it to follow terrian.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×