Skip to main content

Module placing

Module placing 

Source

ModulesΒ§

observers πŸ”’
states πŸ”’
templates
Templates according to which trains should be built. While placing, only the meshes and materials are spawned, everything else is kept in a resource.

StructsΒ§

CurrentPlacingDir πŸ”’
CurrentPlacingTrain
Stores the template of the currently placing train. Used to create the virtual pieces and later the actually placed ones.
PlacingTrainPlugin
Virtual πŸ”’
Marker component grouping all of the virtual pieces of the trains together. The virtual pieces store only the information needed to provide visual feedback to the user, all other information is stored in CurrentPlacingTrain.
VirtualBogie πŸ”’
VirtualCarriage πŸ”’
VirtualTrain πŸ”’

FunctionsΒ§

get_filtered_intersection πŸ”’
get_intersection πŸ”’
get_n_points_along_active_track πŸ”’
Tries to find and calculate n (length of spacings) points along active track starting at segment and idx, moving along dir.
input_handler πŸ”’
Handles switching the direction of the train.
move_n_meters_along_active πŸ”’
Function which tries to move n meters in global space along active connections.
move_virtual_carriages_to_bogies πŸ”’
register_state_handlers πŸ”’
update_placing_train πŸ”’
System which updates virtual train’s bogies positions according to head train position
update_state_text πŸ”’