Skip to content

Implement Carriage tilt/roll according to track tilt #25

Description

@lhwdev

More realistic train movement. Previously Carriage would follow position and gradient of track graph via TravellingPoint, but not tilt. As track graph is considered joint of lines/curves, additional handling is needed for this. (can be simply get from BezierConnection.getNormal(t) though)

  • Add DimensionalCarriageEntity.railx$tilt.
    • yaw/pitch should also update due to different tilt of leading/trailing.
  • Carriage.updateContraptionAnchors() updates tilt value.
  • Add OrientedContraptionEntity.railx$roll and getRailx$viewZRot().
  • DimensionalCarriageEntity.alignEntity() applies its roll value to OrientedContraptionEntity.
  • Apply mixin to methods that is related to yaw/pitch/roll.
  • Also tilt bogey.
  • Update position/rotation of passenger.
  • Update perspective of passenger player.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    • Status
      In progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions