Skip to content

Following a person into a vehicle loses the person after disembark #2

Description

@mayor-modder

Problem

When following a person who enters a vehicle, the mod can switch to following the vehicle itself and fail to resume following the original person after they disembark.

Observed behavior

  • Follow a person in first person.
  • The person boards a car, train, or bus.
  • The camera follows the vehicle while they are riding.
  • After the person disembarks, the camera can remain attached to the vehicle.

Initial code evidence

EntityFollower.Filter() mutates CameraDataModel.FollowEntity from the user-selected person to CurrentTransport or CurrentVehicle. That appears to lose the distinction between the selected subject and the per-frame camera attachment target. The current disembark recovery relies on a narrow ResidentFlags.Disembarking check against LastFollowEntity, which can miss the handoff.

Likely files:

  • EntityFollower.cs
  • DataModels/CameraDataModel.cs
  • Transformer/CameraTransformer.cs

Acceptance criteria

  • The selected follow subject remains stable when a person enters a vehicle.
  • The camera can attach to the ridden vehicle for position/rotation while preserving the person as the logical target.
  • After disembark, the camera naturally resumes following the person.
  • Follow behavior works for car, bus, train, and subway boarding/disembark scenarios.

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-workTracked by an agent-assisted workflowarea-follow-modeFollow target selection and handoff behaviorpriority-highHigh priority issue

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions