PDA

View Full Version : Optics Direction Problem



RKSL-Rock
Jun 13 2007, 11:15
Ok this is holding me up on a few problems.  if someone can help me fix this i'll post my multi turret tutorials


The problem isnt a simple as it seems.  This only affects the 2nd turret that is 90 degrees to the centre line of the vehicle.

http://www.rkslstudios.info/FILES/tmp/doorgun1.jpg

The gun works fine and traverses properly. But once you press "V" for optics the view is turned 90 degress to the barrel of the weapon.

CFG Models section
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

class SIDE_TURRET //the horizontal moving part of the turret
{
type=&#34;rotationY&#34;;
source=&#34;obsTurret&#34;;
selection=&#34;SIDE_TURRET&#34;;
axis=&#34;AXIS_SIDE_TURRET&#34;;
animPeriod=0;
memory=1;
minValue=&#34;rad -360&#34;;
maxValue=&#34;rad +360&#34;;
angle0=&#34;rad -360&#34;;
angle1=&#34;rad +360&#34;;

};
class SIDE_TURRET_GUN //the vertical moving part of the turret
{
type=&#34;rotationZ&#34;;
source=&#34;obsGun&#34;;
selection=&#34;SIDE_TURRET_GUN&#34;;
axis=&#34;AXIS_SIDE_TURRET_GUN&#34;;
animPeriod=0;
memory=1;
minValue=&#34;rad -360&#34;;
maxValue=&#34;rad +360&#34;;
angle0=&#34;rad -360&#34;;
angle1=&#34;rad +360&#34;;

};[/QUOTE]

CFG Vehicles Section:
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">  class SIDE_TURRET &#58; MainTurret
{
    body=&#34;SIDE_TURRET&#34;;
  gun=&#34;SIDE_TURRET_GUN&#34;;
  animationSourceBody = &#34;obsturret&#34;;
animationSourceGun = &#34;obsgun&#34;;
animationSourceHatch = &#34;&#34;;
selectionFireAnim = &#34;zasleh_1&#34;;
proxyIndex = 2;

gunnerName = &#34;Left Door Gunner&#34;;
commanding = -2;
minElev = -50;
maxElev = 10;
initElev = -0;
minTurn = -70;
maxTurn = +70;
initTurn = 0;
initFov = 0.600000;
minFov = 0.100000;
maxFov = 1.00000;
primary = 0;
weapons&#91;&#93; = {&#34;RKSL_LYNX_GPMG&#34;};
magazines&#91;&#93; = {&#34;RKSL_600Rnd_762x51_GPMG&#34;};
gunBeg = &#34;GPMG_stop&#34;;
gunEnd = &#34;GPMG_start&#34;;
gunnerAction = &#34;UH60_Gunner&#34;;
gunnerInAction = &#34;UH60_Gunner&#34;;
memoryPointGun = &#34;GPMG_stop&#34;;
gunnerOpticsModel = &#34;&#92;ca&#92;weapons&#92;optika_empty&#34;;
gunnerOutOpticsShowCursor = 1;
gunnerOpticsShowCursor = 1;
memoryPointGunnerOptics = &#34;gunnerview_2&#34;;
memoryPointsGetInGunner = &#34;pos_gunner_2&#34;;
memoryPointsGetInGunnerDir = &#34;pos_gunner_2_dir&#34;;
class ViewOptics
{

initAngleX = 0;
minAngleX = -50;
maxAngleX = 10;
initAngleY = 90;
minAngleY = -70;
maxAngleY = +70;

initFov = 0.42;
minFov = 0.22;
maxFov = 0.64;
};
};[/QUOTE]

normally i would expect the "class ViewOptics - initAngleY = 90;" to change the direction but its ahving no effect int his case - anyone got any suggestions?

Planck
Jun 13 2007, 12:45
Not sure if this helps any, but, when I was playing about with the Elite ch47 I got the doorgun turret working eventually and the values I used for ViewOptics was:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">
class ViewOptics
{
initAngleX = 0;
minAngleX = -30;
maxAngleX = 30;
initAngleY = 0;
minAngleY = -100;
maxAngleY = 100;
initFov = 0.600000;
minFov = 0.600000;
maxFov = 0.500000;
};
[/QUOTE]

Bearing in mind the ch47 only has the one door gun, this may not help at all, but, I threw it in there anyway. http://forums.bistudio.com/oldsmileys/tounge2.gif

Good luck with it anyway.


Planck

RKSL-Rock
Jun 14 2007, 20:06
Not sure if this helps any...Good luck with it anyway.


Planck
Thanks mate unfortunately that didnt fix it but I did find the solution inthe end. The optics point was "corrupt". I deleted it and remade the point and it worked first time. http://forums.bistudio.com/oldsmileys/tounge2.gif

Thanks for the reply though. I really appreciate it.