Jump to content

Editing Combined Arms .lua


Jacks
 Share

Recommended Posts

Last request I promise. I have an issue with a few vehicles in a mod pack I am using, the view seems to be rotated by 90 degrees (please see attached photo).

 

I assume this is used a bug in the vehicles .lua file but I can't find the line of code that sets the angle of the view when behind the weapon system. Can anybody help?

 

I have also attached the .lua file for the vehicle in question.

 

Regards,

 

Jacks

Screen_150831_193637.thumb.jpg.43f50604a88617874e1c3c66d931466b.jpg

DES_EXA.lua

System Specs: i7 8700k @ 5.0GHz (not delidded), ASRock Extreme4 Z370 MOBO, EVGA GTX 1080 SC 8GB, 32GB Corsair Vengeance LPX 3200MHz DDR4 RAM, Samsung Evo 240GB SSD, Samsung Evo 500GB SSD, 1TB HDD, Noctura NH-D15S Heat Sink, Acer VE278H 27" 1080p Monitor, Ocukus Rift CV1.

 

Controllers: TrackIR 5, Thrustmaster HOTAS X, Saitek Throttle Quadrant (with DIY removable collective mod), Saitek Pro Flight Rudder Pedals.

 

Just trying to keep my number of takeoffs and landings equal!

Link to comment
Share on other sites

Ok, thanks for your help.

 

Jacks

System Specs: i7 8700k @ 5.0GHz (not delidded), ASRock Extreme4 Z370 MOBO, EVGA GTX 1080 SC 8GB, 32GB Corsair Vengeance LPX 3200MHz DDR4 RAM, Samsung Evo 240GB SSD, Samsung Evo 500GB SSD, 1TB HDD, Noctura NH-D15S Heat Sink, Acer VE278H 27" 1080p Monitor, Ocukus Rift CV1.

 

Controllers: TrackIR 5, Thrustmaster HOTAS X, Saitek Throttle Quadrant (with DIY removable collective mod), Saitek Pro Flight Rudder Pedals.

 

Just trying to keep my number of takeoffs and landings equal!

Link to comment
Share on other sites

I was able to get the view for this mod oriented properly. I ended up using a LUA unit definition command which isn't used in DCS unit definitions since binding to connectors became the better solution.

 

Proof of concept is attached.

OD_EXA.lua

 

Instead of binding elements to a connector which is not oriented properly you can can bind elements to a set of co-ordinates using a .pos parameter.

 

So instead of 
GT.WS[ws].connector_name = 'CENTER_TOWER''
use 
GT.WS[ws].pos = {x, y, z };

GT.WS[ws].LN[1].BR[1].connector_name = 'POINT_GUN'
GT.WS[ws].LN[1].BR[1].pos = { x, y, z };

then adjust so that it matches up nicely
GT.WS[ws].LN[1].customViewPoint = { "genericAAA", {x,y,z}, };

 

This is not a perfect solution because wonky models are still wonky models. Modding the desired RG31 MRAP was irritating because the gun is not aligned perfectly with the turret - perhaps a a feature of the actual vehicle in real life? I spent a lot of time trying to get a proper ironsight working (trying a lot tricks I won't go into in this post) but I wasn't happy with the results.

 

To get the x,y,z co-ordinates (if you don't have original 3dmax source) use the modelviewer and turn on grid, turn on orthographic, take screenshot of TOP view, take screenshot of LEFT view. Scale in image editor so that 1m = 100 pixels. Count pixels from point to point.

 

uv2ibTs.jpg


Edited by vicx
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...