Share how to fix the gun sound and camera of germ_flak_36_sdkfz_6_2 (SWS 37mm Half Track)

germ_flak_36_sdkfz_6_2 (SWS 37mm Half Track) with fix the gun sound and camera.

entity{
  _template:t="germ_flak_36_sdkfz_6_2"
  transform:m=[[0.486305, 0.0427899, 0.872741] [-0.0767682, 0.99703, -0.00610733] [-0.87041, -0.0640288, 0.488145] [-995.031, 4.71219, -1619.31]]
  team:i=2

  "turret_control__turretInfo:shared:array"{
    "turret_control__turretInfo:object"{
      salt:i=1
      gun:t="as_42_metropolitana_turret_01_20mm_breda_20_65_m35+base_37mm_flak36+turret_with_several_types_of_shells+main_turret"
      barrelDm:t="gun_barrel"
      breechDm:t="cannon_breech"
      turretName:t="turret_01"
      verDriveDm:t="drive_turret_v"
      horDriveDm:t="drive_turret_h"
    }
  }

  "vehicle_seats__seats:shared:array"{
    "vehicle_seats__seats:object"{
      receiveDamageFromDMPart:t="driver"
      attachTm:m=[[1, 0, 0] [0, 1, 0] [0, 0, 1] [-0.25, -0.25, 0]]
      name:t="driver"
      seatComponent:t="isDriver"
      cameraNodeName:t="bone_camera_driver"
      attachNode:t="driver"
      seatOwnsEntityControl:b=yes
      nextSeat:t="main_gunner"
      locName:t="vehicle_seats/driver"
      ignoreAttachNodeRotation:b=yes
      shouldHideOwner:b=no
    }

    "vehicle_seats__seats:object"{
      receiveDamageFromDMPart:t="gunner"
      attachTm:m=[[1, 0, 0] [0, 1, 0] [0, 0, 1] [-0.25, -0.5, 0]]
      cameraOffset:p3=-2.2, 0.6, 0
      name:t="main_gunner"
      seatComponent:t="isGunner"
      cameraNodeName:t="bone_camera_gunner"
      cameraType:t="machinegunner_cockpit"
      attachNode:t="gunner"
      nextSeat:t="driver"
      locName:t="vehicle_seats/gunner"
      ignoreAttachNodeRotation:b=yes
      shouldHideOwner:b=no

      "turretNames:array"{
        turretNames:t="turret_01"
      }
    }

    "vehicle_seats__seats:object"{
      receiveDamageFromDMPart:t="commander"
      attachTm:m=[[1, 0, 0] [0, 1, 0] [0, 0, 1] [-0, 0.1, 0.1]]
      cameraOffset:p3=-5, 0.29, 0
      name:t="commander"
      seatComponent:t="isDriver"
      cameraType:t="machinegunner_cockpit"
      attachNode:t="commander"
      locName:t="vehicle_seats/commander"
      ignoreAttachNodeRotation:b=yes
      maxPosWithOpenHatch:r=0.4
      shouldHideOwner:b=no
    }

    "vehicle_seats__seats:object"{
      receiveDamageFromDMPart:t="loader"
      attachTm:m=[[1, 0, 0] [0, 1, 0] [0, 0, 1] [-0, -0, 0]]
      seatComponent:t="isPassenger"
      cameraNodeName:t="bone_camera_driver"
      attachNode:t="loader"
      locName:t="vehicle_seats/loader"
      ignoreAttachNodeRotation:b=yes
      shouldHideOwner:b=no

      "loaderTurretNames:array"{
        loaderTurretNames:t="turret_01"
      }
    }
  }
}

  • It looks like we can use cameraType:t="machinegunner_cockpit" and cameraOffset:p3 to make a 3rd person camera view for vehicle

  • We also can modify the shell type of the vehicle in a similar way as above, but sometimes it doesn’t work, any attempt requires some experimentation, and sometimes the game running on the server may get different results than the local game.

5 Likes

This is very useful lines. Thank you.

Have you tried this code to normal tanks with cockpits?

1 Like