Jump to content
Sign in to follow this  
UK_Apollo

Turret Turn-In / Turn-Out

Recommended Posts

Does anyone know of documentation or tutorials on how to configure vehicle turret positions for turn-in and turn-out please?

Or be kind enough to give some explanation from personal experience?

 

Vehicle crew position

- Turned-in, sitting on a seat facing port, with an interior view of the cargo cabin, per a normal passenger (no FFV)

- Turned-out, stands up through an elevated hatch, facing forward, with FFV

 

I have some of the basics working, such as the turn-in/out option and FFV when turned-out, but am having trouble with viewpoints for the turned-in animation which seem to be inside the body.

 

 

Share this post


Link to post
Share on other sites
Good question. I've wrestled with this and had the same problem.

 

I don't think you'll find any documentation on this as it's basically a hack.

 

The only way I've got it to 'sort of' work is to have two proxies for the same position,

one for each 'state' and move between them with a user action

locking and unlocking the positions as appropriate.

 

Problem is it only works if you are the effective commander of the vehicle.

 

Burnes (and I think Chairborne) seem to rotate and translate the single proxy

to the new position but how then do you switch between animations?

Share this post


Link to post
Share on other sites

Burnes (and I think Chairborne) seem to rotate and translate the single proxy

to the new position but how then do you switch between animations?

gunnerAction="";

gunnerInAction="";

?

 

 

I have some of the basics working, such as the turn-in/out option and FFV when turned-out, but am having trouble with viewpoints for the turned-in animation which seem to be inside the body.

is the inside-position with freelook? Or is it locked ? If it's locked, you have optic view enabled. Make sure you do not force optics and that you do not specify an optic model  (gunnerOpticsModel= ""; //<- should disable interior optic mode)

if thats not it, you need to be more specific what exactly is happening (pictures/video).

Share this post


Link to post
Share on other sites

Thanks cleggy, I've done it your way using scripts too, but as you say, it's a bit hacky and I'm not sure it plays nicely with Zeus and AI, so I was looking for an in-engine solution if one exists.

 

Looking at the BIS turned-in/out examples, both poses are close to each other. What we need is something that works when the proxies are translated significantly away from each other.

 

Translating/rotating the proxies with an animation sounds interesting if it moves the viewpoint too.

Share this post


Link to post
Share on other sites

Thanks also x3kj, I've just seen your edit addition and will look into that.

I've just tried cargo proxy animations and they seem to work, so will continue looking into that option for now.

Share this post


Link to post
Share on other sites

Solved.

 

The in-built solution to this is to use 'animationSourceHatch = ' within the Turret definition, which creates an animation source that can be utilised in model.cfg to provide the necessary translations and rotations from turned-in to turned-out cargo proxies.

 

Side-note: in order for the turned-in cargo proxy to have a correctly aligned view, but not be able to fire his weapon, enable it with inGunnerMayFire, but then disable it when the hatch is closed.

animationSourceHatch = "gunner_move";    // use gunner_move as an animation source in model.cfg

inGunnerMayFire = 1;
enabledByAnimationSource = "hatch_animation";    // disable FFV when hatch is closed

Share this post


Link to post
Share on other sites

Glad you solved it apollo - but I'm being a bit thick -

 

why has animationsourcehatch and enabledbyanimationsource got different names?

Share this post


Link to post
Share on other sites

Because they are two different animations. One is for the gunner proxy movement, and the other is the hatch movement.

Share this post


Link to post
Share on other sites

Hey, Would you be able to post the relevant parts of the model.cfg (Cargo translation and hatch rotation) and the full cargoturret config please?. Im trying to use your implementation and ive got everything working apart from the hatch itself not animating which causes the firing to be locked. I have a feeling its the way my animation sources are setup and seeing how yours is would be tremendously helpful. cheers

Share this post


Link to post
Share on other sites

I'm struggling with making this business work.

 

Using 'animationsourcehatch' I've managed to get a rather nifty tun out animation for my gunner.

 

Rightly or wrongly I'm using the same animation source to open and close his hatch. (works).

 

The thing I can't get to work is 'enabledbyanimationsource' - he just keeps firing while turned in.

 

Basically I've no idea what animation source to use for 'enabledby....'

Whatever I try makes not a jot of difference.

 

Can anyone put me out of my misery?

Share this post


Link to post
Share on other sites

I'm struggling with making this business work.

 

Using 'animationsourcehatch' I've managed to get a rather nifty tun out animation for my gunner.

 

Rightly or wrongly I'm using the same animation source to open and close his hatch. (works).

 

The thing I can't get to work is 'enabledbyanimationsource' - he just keeps firing while turned in.

 

Basically I've no idea what animation source to use for 'enabledby....'

Whatever I try makes not a jot of difference.

 

Can anyone put me out of my misery?

good example for enabledbyanimationsource is "CargoRamp_Open", makes no sense to shoot while its closed. since you use the hatch animationsource you dont need enabledbyanimationsource.

to stop him firing while turned in try inGunnerMayFire=0; (with most vehicles you would choose a turnedin animation where you wouldnt be able to shoot no matter what, so maybe check if you can find a better animation for gunnerInAction.)

Share this post


Link to post
Share on other sites

Thanks for the replies

 

Could u post the relevant parts u need to add to the config, im struggling get it working too!

Here is what I have, Mike:
 
CONFIG.CPP

class CargoTurret_01: CargoTurret
{
gunnerAction  = "vehicle_turnout_2"; 
gunnerCompartments  = "Compartment3"; 
memoryPointsGetInGunner  = "pos cargo L"; 
memoryPointsGetInGunnerDir  = "pos cargo L dir"; 
gunnerName  = "Left Top Cover"; 
proxyIndex  = 4; 
maxElev  = 15; 
minElev  = -25; 
maxTurn  = 120; 
minTurn  = -120; 
isPersonTurret  = 2; <<<< also tried 1 
ejectDeadGunner  = 0; 
enabledByAnimationSource  = "left_gunner_move";
usepip = 0;
gunnerInAction = "passenger_inside_2";
startEngine = 0;
commanding = 0;
canHideGunner = 1;
outGunnerMayFire = 1;
LODTurnedIn=1200;
LODTurnedOut=1;
animationSourceHatch = "left_gunner_move";   <<<< used in model.cfg
};


MODEL.CFG

class Animations
{


class LHatch_handler
{
type="rotation";
source="left_gunner_move";
selection="LHatch";
axis="Lhatch_axis";
memory=1;
minValue=0.000;
maxValue=1;
angle0=0.000;
angle1=rad 160;
};
class left_gunner_rot
{
type="rotationY";
source="left_gunner_move";
selection="left_gunner";
axis="left_gunner_Y_axis";
memory=1;
minValue=0.000;
maxValue=1;
angle0=0.000;
angle1=rad -120;
};
class left_gunner_transY
{
type="translationY";
source="left_gunner_move";
selection="left_gunner";
axis="left_gunner_Y_axis";
memory=1;
sourceAddress="clamp";
offset0=0;
offset1=0.15;
minValue=0;
maxValue=1;
};
class left_gunner_transZ
{
type="translationZ";
source="left_gunner_move";
selection="left_gunner";
axis="left_gunner_Z_axis";
memory=1;
sourceAddress="clamp";
offset0=0;
offset1=0.25;
minValue=0;
maxValue=0.3;
};
class left_gunner_transX
{
type="translationX";
source="left_gunner_move";
selection="left_gunner";
axis="left_gunner_X_axis";
memory=1;
sourceAddress="clamp";
offset0=0;
offset1=0.25;
minValue=0;
maxValue=0.1;
};
};

 

 

to stop him firing while turned in try inGunnerMayFire=0; 

Appreciate the input Scars - what we are attempting here is to rotate and translate the proxy

so when turned out he is facing in a different direction from when seated. It's a bit of a hack.

ingunnerMayFire =0 doesn't work because it changes your FOV when seated and you end up looking

out of the proxies crutch!

Share this post


Link to post
Share on other sites

modelcfg is in most cases not needed. cargoproxy and proper config.cpp and fitting animations usually do the trick.

rotation is done with the turnoffset entry, translation with using sitting anim for ingunner and standing anim for outgunner f.e.

ispersonturret = 2 means that you can use personal weapons when turned in and out, wich usually isnt the case anyway, when u can shoot while turned in, why turn out in the first place.

 

the code below should be pretty much all you need, as stated above, finding the right animations can be a little annoying, usually a good idea to see what combinations BIS use.

class CargoTurret;
class ViewCargo;
class CargoTurret_01: CargoTurret
{
class ViewGunner: ViewCargo    {};  //should fix the arseview, hopefully
gunnerAction  = "vehicle_turnout_2";
gunnerCompartments  = "Compartment3";
memoryPointsGetInGunner  = "pos cargo L";
memoryPointsGetInGunnerDir  = "pos cargo L dir";
gunnerName  = "Left Top Cover";
proxyIndex  = 4;
maxElev  = 15;
minElev  = -25;
maxTurn  = 120;
minTurn  = -120;
isPersonTurret  = 1; 
ejectDeadGunner  = 0;
enabledByAnimationSource  = "left_gunner_move";
usepip = 0;
gunnerInAction = "passenger_inside_2";
startEngine = 0;
commanding = 0;
canHideGunner = 1;
inGunnerMayFire = 0;
outGunnerMayFire = 1;
LODTurnedIn=1200;
LODTurnedOut=1;
class TurnIn
                    {
                    turnOffset = -180;
                    };
                    class TurnOut: TurnIn
                    {
                    };
};

if this doesnt help at all, maybe post a screenshot of the model so i can actually see what exactly you try to do.

Share this post


Link to post
Share on other sites

Thanks for the code snippet Scars. Although your solution is much neater than my model.cfg spamming

I can't get it to work at my end.

 

ViewCargo: no, as soon as I set InGunnerMayFire = 0, I still get arseview AND he can still fire!

 

TurnOffset: Doesn't rotate my gunner

 

With my version I've made a bit of progress. The idea was obvious really - I set my seated animation to a non FFV pose.

Because I have cargo weapons hidden when turned in he has no weapon to fire with.

 

Unfortunately he can still press the fire button and go BANG but he can't actually kill someone thru' the sides of the vehicle

as he could previously.

 

EDIT: here's a example of what I have - ignore the LOD switching - that I can fix!

 

https://youtu.be/NW86yow73TI

Share this post


Link to post
Share on other sites

Yes Scars looks OK

 

FFV_pose.jpg

 

I actually changed the turned in pose to a normal cargo pose which helped (as per the video)

no held weapon = no damage done even if there is still a BANG,BANG.

 

He can still throw grenades out of the vehicle tho'!!!

 

However, if the player puts all his weapons into the vehicle 'crate' when he turns in - PROBLEM SOLVED! :P

should be standard operating procedure surely? /jk

Share this post


Link to post
Share on other sites

well, then u did a great job in making a smooth animation for him to get out :)

I have a open top car with 5 cargo spots coming up, so i will have to look into cargopositions in more detail myself.

If i find a working way to do what u wanna do i let you know

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  

×