Mounts and Seats
A mount is any item an agent occupies rather than merely stands next to — a chair, a bench, a cart, a horse. The item carries a Mount component, and each place an agent can occupy is a Seat beneath it.
An agent sits down through the Mount action, or through any action whose POI action the item performs seated. It then stays seated until an action needs it on its feet.
A mount is also how agents travel. An agent in a seat marked as a Control Point drives the mount, so an action that would have walked it somewhere moves the cart or horse there instead, along with everyone else seated on it. An agent in any other seat is a passenger and goes where the mount goes.
See Behaviour Actions for the actions themselves.
The short version
- Select your item and add the
Mountcomponent. - Set Mount Transform to the root object of the thing that moves.
- Under Seats, press
+. A child namedSeatappears at the mount's position. - Move the seat to where the agent should end up sitting.
That is a working mount. Everything below is refinement.
The Mount component
| Field | What it does |
|---|---|
| Mount Transform | The root (highest parent) transform of the mount. Movement is applied here, not to the seated agent |
| Seats | The list of seats beneath this mount |
Leave Mount Transform empty and the Mount component's own transform is used. Set it explicitly whenever the component sits on a child of the thing that actually moves — a cart whose Mount lives on a body object still has to drive the cart root.
Seats are found by searching the mount's children, at any depth, so a seat parented under a cart's bench object is picked up like one parented directly. The list is rebuilt every time the inspector is drawn, so seats you add or reparent by hand appear without any further action.
The + button creates a child GameObject named Seat at the mount's own position, with a SeatService already on it. The - button destroys the selected seat object outright.
New seats are created as control points. On a bench or a row of passenger places, turn Control Point off for every seat that should not drive.
The list is reorderable, and the order is meaningful — see How a seat is chosen.
The Seat component
Each row in the mount's seat list is a Seat object with its own inspector.
| Field | What it does |
|---|---|
| Distance Tolerance | How close the agent must get before it is placed into the seat. Leave at 0 to use the ordinary arrival check instead |
| Control Point | Whether an agent in this seat drives the mount |
| Transition Style | BLEND or SNAP — how the agent travels from the mount location to the seat while the animation plays |
| Transition Lead In | Seconds to hold still at the start of a blended transition, covering the animator's crossfade. Defaults to 0.25 |
| Mount Location | Where the agent walks to before mounting. Falls back to the seat itself |
| Dismount Location | Where the agent is placed when it gets out. Falls back to the mount location, and then to the seat |
| Mount Animation | Played at the mount location before the agent takes the seat. Leave empty to sit immediately on arrival |
| Dismount Animation | Played from the seat before the agent is put back on its feet. Leave empty to stand immediately |
Mount Location and Dismount Location each have a button that creates the object if it does not exist yet, and selects and frames it if it does. Both are created as children of the seat, at the seat's position, so the first thing to do after creating one is move it somewhere an agent can actually stand.
The mount and dismount animations are authored with the same endpoint widget the item's Action POIs use, so a getting-in animation is set up exactly like a use animation.
Reading the scene gizmos
Select a seat and it draws itself:
| Colour | Shape | What it marks |
|---|---|---|
| Blue | Sphere | The seat — where the agent ends up |
| Blue | Wireframe | The distance tolerance, drawn around the approach point |
| Red | Sphere | The mount location |
| Green | Sphere | The dismount location |
The tolerance sphere is centred on the mount location where one is authored, not on the seat, because the mount location is the point the agent actually walks to.
How a seat is chosen
When a Mount action runs, the agent asks the mount to reserve it a seat.
- A free control point wins outright, however far away it is. A cart with nobody at the controls goes nowhere, so filling the driving seat is worth a longer walk than taking the nearest bench space and stranding the cart. Control points are considered in the order they appear in the mount's seat list, so the same seat is the driver's every time.
- Otherwise the nearest free seat wins, measured by its mount location rather than by the seat. On a cart the seats sit together while their mount locations are spread down its sides, and the walk is what the agent pays for.
A seat is reserved the moment it is chosen, and stays reserved for the whole walk over. Without that, every agent heading for the same bench picks the same free seat and they race for it on arrival. The claim is given up when the agent sits down, and again when it dismounts. An action that fails or is abandoned on the way over gives it up too.
An agent that asks twice gets the seat it already holds, so a Mount action that spans several ticks does not wander between seats.
A mount with no seat the agent can take is passed over when the item is chosen, so the agent walks to the next bench rather than to a full one. If every matching mount is full the action fails, and the agent goes and finds something else to do.
Mounting and dismounting
Once the agent is within tolerance of the mount location:
- It turns to match the seat's heading.
- The Mount Animation plays.
- The agent is parented to the seat and zeroed against it, so a passenger on a moving cart stays in place and faces forward as the cart moves under it.
Dismounting runs the same way in reverse, minus the turn — by then the agent is parented to the seat, and turning it would spin the seated character in its chair.
Transition style
The right choice depends on the clip.
BLEND carries the agent from where it is standing to the seat over the length of the animation. This is what a mocap transition clip needs: a clip like Stand_Trans_SitChair carries its movement as root motion, and an agent driven by the nav mesh generally has Apply Root Motion switched off, so that displacement is discarded and the agent performs the whole sit on the spot. BLEND puts the movement back.
SNAP leaves the agent where it stands and places it at the end. Use it for a clip authored in place.
Transition lead in
A blended transition holds still for Transition Lead In seconds before it starts moving, to cover the layer fading in and the clip crossfading. Match it to Layer Blend in the Animation tab of module settings, or the layer's own Fade Seconds if it has one. The default of 0.25 is comfortably above the default blend of 0.15.
Set it too low and the agent starts sliding toward the seat before it has visibly begun to move, landing in the seat early.
Staying seated
An agent that has sat down stays seated until an action needs it standing. There is no Dismount to author between seated actions: a villager that rests and then eats at the same table sits down once.
Each action is judged as it starts, against the seat the agent is in at that moment.
| The next action is | A seated agent |
|---|---|
Idle or Await for Mount to be Filled | Stays seated |
Mount, or a locate with a seated POI action, that its current item answers | Stays seated, in the same seat |
Mount, or a locate with a seated POI action, for something else | Stands up, then goes to the right one |
Dismount | Stands up |
| Anything else, from a passenger seat | Stands up first, then carries on |
| Anything else, from a control point | Stays seated and drives the mount there |
The item an agent is sitting on answers an action when it passes the action's item name, type and size filters and falls under its ownership mode. So an action set to HOME stands an agent up from a tavern bench and sends it to a chair in its own house. The in-use and reserved filters are left out of that check, since it is often the sitter that set them.
An agent stands up with its seat's Dismount Animation, exactly as the Dismount action does. The behaviour tree does not move on while that plays, and standing up can never fail the action that asked for it.
The Mount setting
Every action node has a Mount dropdown for the times the table above is not what you want.
| Value | What it does |
|---|---|
AUTO | Follows the table above. The default, and what every action authored before 0.15.0 uses |
KEEP | Never stands the agent up for this action |
UNMOUNTED | Always stands the agent up first, even from a control point, and performs a POI action standing beside |
KEEP on an action that walks somewhere never finishes from a passenger seat, because a passenger cannot move. Use it for actions performed where the agent already is.
Actions performed seated
An item's Action POIs are performed seated when the item has a Mount component. A Locate with an eating POI action that reaches a bench does not stand the agent beside the bench to eat. It reserves a seat, walks to that seat's Mount Location, sits down, and then plays the POI's behaviour.
This applies to Locate, Locate Random and Locate in Zone 1/2. The Mount action always sits the agent down, whatever the POI says.
The agent walks to the seat's mount location rather than to the POI's own Spot. One POI is shared by every seat on a bench, and the mount location is the point each seat is boarded from.
Performed Standing
Some actions on a mount are done beside it: loading a cart, repairing a bench, making a bed. Select the Action POI on the item and tick Performed Standing. The agent then walks to the POI's spot and performs it on its feet, as it would on any other item.
The toggle only appears on items that have a Mount component, since it means nothing anywhere else.
Common problems
| Symptom | Cause |
|---|---|
| Agent stands up and sits straight back down between two actions | A Dismount node is still between them, or the second action's filters do not match the item it is on |
| Agent sits down to do something meant to be done beside the mount | Action POIs are performed seated by default. Tick Performed Standing on that POI |
| Agent performs a seated action standing beside the item | The action's Mount setting is UNMOUNTED, or the POI has Performed Standing ticked |
Seated agent never starts an action set to KEEP | The action walks somewhere and the agent is in a passenger seat. Use AUTO |
Seated agents stand up before every action, Idle included | The action type collection did not load, or a built-in entry was renamed. The console says which |
| Agent stands beside the seat forever | Its mount location is somewhere it cannot reach, or the tolerance is too small for it to satisfy |
| Agent performs the whole sit on the spot, then pops into the seat | Transition style is SNAP on a mocap clip that moves. Use BLEND |
| Agent slides into the seat before the animation starts | Transition lead in is lower than the layer's fade in |
| Agent is shoved out backwards on dismount | No dismount location, and the mount location it falls back to is off the nav mesh |
| Every agent walks to the same seat | Seats are being read directly rather than reserved. Reservation is what the Mount action does for you |
| The cart never moves with a driver aboard | No seat on it has Control Point enabled |
| Mount action does nothing and warns in the console | The matched item has no Mount component on it |
Next step
Continue to Agent Inventory, or see Behaviour Actions for the Mount, Dismount and Await for Mount to be Filled actions that drive all of this. The rules on this page are applied by the Mount Reconciler.