[QUESTION] How to change cockpit pilot view position

The place to discuss scripting and game modifications for X4: Foundations.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Post Reply
JokerOmega1
Posts: 11
Joined: Tue, 17. Jan 17, 05:38
x4

[QUESTION] How to change cockpit pilot view position

Post by JokerOmega1 » Tue, 19. Mar 24, 20:46

I have a particular ship unit that I want to change the cockpit view position on (pull it back a bit), and I am hoping someone can point me in the right direction. Does one change these parameters in the unit's XML, or does it have to be done on the model itself (like a hard point)?

Rothank
Posts: 41
Joined: Mon, 11. Aug 14, 22:48
x4

Re: [QUESTION] How to change cockpit pilot view position

Post by Rothank » Tue, 19. Mar 24, 21:01

Depends. For S/M ships the "cockpit view" is actually dependent on your player character, as you are sitting in a chair that has a fixed position. You cannot move the chair nor cockpit without breaking the model and having gaps in the mesh.

For L/XL ships the drill is mostly the same, HOWEVER, their bridge/cockpit is NOT a physical part of the model and can be adjusted by moving "cockpit connection" position in ship's component xml (in assets\units\size_[SIZE] location).

for example:

Code: Select all

      <connection name="con_cockpit_01" tags="cockpit cockpit_visible ">
        <offset>
          <position x="0" y="29.12331" z="117.9724" />
        </offset>
      </connection>
WARNING! Changing the position will break bridges on all per-existing ships of the class you altered. If you shift, for example, Osaka's bridge just 1m up - it will be fine on freshly built Osakas, but all the pre-existing ones in your save will reset to 0,0,0, which is inside the ship's geometry and completely unusable.
Image Image
Image

JokerOmega1
Posts: 11
Joined: Tue, 17. Jan 17, 05:38
x4

Re: [QUESTION] How to change cockpit pilot view position

Post by JokerOmega1 » Tue, 19. Mar 24, 21:41

Rothank wrote:
Tue, 19. Mar 24, 21:01
Depends. For S/M ships the "cockpit view" is actually dependent on your player character, as you are sitting in a chair that has a fixed position. You cannot move the chair nor cockpit without breaking the model and having gaps in the mesh.

For L/XL ships the drill is mostly the same, HOWEVER, their bridge/cockpit is NOT a physical part of the model and can be adjusted by moving "cockpit connection" position in ship's component xml (in assets\units\size_[SIZE] location).

for example:

Code: Select all

      <connection name="con_cockpit_01" tags="cockpit cockpit_visible ">
        <offset>
          <position x="0" y="29.12331" z="117.9724" />
        </offset>
      </connection>
WARNING! Changing the position will break bridges on all per-existing ships of the class you altered. If you shift, for example, Osaka's bridge just 1m up - it will be fine on freshly built Osakas, but all the pre-existing ones in your save will reset to 0,0,0, which is inside the ship's geometry and completely unusable.
Hmm, well in this case the ship is an addon (mod) medium-class vessel. When sitting in the cockpit chair, the camera view is way ahead of the chair and off to the right. I basically want to tweak it so that isn't the case.

Lc4Hunter
Posts: 2170
Joined: Sun, 2. Apr 06, 16:15
x4

Re: [QUESTION] How to change cockpit pilot view position

Post by Lc4Hunter » Wed, 20. Mar 24, 11:07

I expect the issue here is the position of the chair. You look throw the eyes of your character. Con_cockpit has nothing to do with that.

Post Reply

Return to “X4: Foundations - Scripts and Modding”