Event for Avatar sitting position

Is it possible to have a event/keybinding to toggle the sitting position of the Avatar when in avatar mode?
The animations are obviously already available (avatar sits on airplanes)?

The viewpoint could be the same as the crouch position (well actually should be higher but for my needs it is not a priority)

So basically just pure visuals, in order to avoid him driving ground vehicles only in standing position :squinting_face_with_tongue:
Thanks a lot

(Use case below time stamp 1.46, but would useful for other ideas, like sitting on a bench doing nothing but watching aircrafts)

I had a look at this using the SPB2XML for MSFS 2024 tool. I looked at Seat_data_pilot_enter.spb and found this line that could be relevant:

<SimMission.PlayBlendTreeStateAction id="Pilot_Sit" InstanceId="{370CBECC-21D6-491D-B39F-5B3F38FD8AEC}">
    <SimBase.Descr>PlayBlendTreeStateAction:Pilot_Sit</SimBase.Descr>
    <BlendTreeStateName>{R:ANIMATION_SIT}</BlendTreeStateName>
    <WorldBase.Immediate>false</WorldBase.Immediate>
    <ForceAnimation>true</ForceAnimation>
    <WorldBase.ObjectReferenceList>
        <ObjectReference id="Interactor" InstanceId="{01D2195A-C621-47EA-BBC8-F8A37101A8D1}" />
    </WorldBase.ObjectReferenceList>
</SimMission.PlayBlendTreeStateAction>

So it looks like they use R:ANIMATION_SIT for this. The target object should be the user aircraft. So maybe something like this RPN code would work: 1 (>@UserAvatar:R:ANIMATION_SIT)

I haven’t tried it out myself, but hopefully it helps you find a solution

The R: variable is read-only and only used for resolving internal resources such as animation names. It cannot be written to or used as a trigger.

To trigger the avatar sitting animation, you cannot directly control R:. You need to go through the avatar’s Behavior Graph, which reacts to supported simulator triggers (like interaction events or avatar state changes) to play the “sit” animation.

One possible approach would be to use a dedicated controller (for example an invisible SimObject) that drives the avatar state indirectly, allowing the Behavior Graph to switch to the sitting animation when the correct condition is met.

Interesting though both!

To my limited experience, pilots animations are (were?) descripted by they model .xml behaviors
They have Transitions (without a Condition that would have some RPN) with references to a specific BlendTreeState with the relevant animation (stuff like PosePropeller/PoseAirliner

So, if the Condition is missing, the docu said that the PlayBlendTreeState is the (or another ?) way to trigger the BlendTreeState.

So I suppose the Liam’s spb is useful because it contains the PlayBlendTreeState for the Avatar (I didn’t check if the model .xml for the Avatar are available)
Adding an RPNAction with a custom simvar drivable via xml maybe could do the trick?

Dig a bit more into this.

The avatar’s animation behaviours are into the
simobjects/proceduralcharacters/avatar/animations.xml

It contains every possible animation, including those in the cinematic like the sit on the sofa looking at the PC in the waiting room

The sitting anim is of course available

In the Transitions, there are all the possible combinations for the walk/run/crouch cycle

So I have tried to override that file putting it in my package and changing the Transitions driven by the
A:IS CROUCH with the correct events, however in the VFS it doesn’t seem to work , still see the default file

So back to the original question, because the animation sare already available,

Can we please have an additional Transition and Simvar for the sitting position?

Thanks :heart:

The override of the animations.xml file works, and it’s indeed possible to add a variable to control an action. In this case, I only set up a variable called “L”, which I trigger via Flow, but it behaves exactly the same as when triggered through SimConnect or WASM.

Added code:

<BlendTreeState name="IDLES_SIT">
  <Animations>
    <Animation guid="e94a56d7-7546-40db-97c7-32c626f07fa4" loop="True" speed="1" weight="1.0"/>
  </Animations>
</BlendTreeState>

<Transition start="IDLES_STAND" end="IDLES_SIT">
  <Condition>(L:AVATAR_SIT, Bool)</Condition>
</Transition>
<Transition start="IDLES_SIT" end="IDLES_STAND">
  <Condition>(L:AVATAR_SIT, Bool) not</Condition>
</Transition>

Video demo:

So weird, I will double check the paths and naming of my override, thanks for sharing, very helful!

Exact path :
simobjects\proceduralcharacters\avatar\animations.xml.

it works, yeah!
path was correct, but

  • it was needed to set the package order hint as SIMOBJECT_PATCH,
  • adding the path to and
  • finally put the compiled package in Community, too (mouting the package by opening the Project in Editor did mount the overriden files in the VFS, but the transitions didn’t worked).

So far so good :slight_smile:

still hoping for a more friendly solution, overriding base files isn’t exacly future proof :slight_smile: