โ† All examples

godot components

Rail camera that rides a Path3D

Move a Camera3D along a Path3D rail to the point closest to its target, with an optional lead, clamping at the rail ends, smooth travel and a constant look at the target.

What this component contains

  • ATTRIBUTION.md
  • LICENSE
  • README.md
  • baltor_test.gd
  • component.json
  • example.tscn
  • inspect_gdscript.py
  • rail_camera_3d.gd
  • run_tests.gd
  • test_package.py
  • tests/test_rail_camera_3d.gd
  • verification/native.json

How it works

Class
BaltorRailCamera3D, extends Camera3D
Methods
get_rail() -> Path3D; rail_offset_for(world_point: Vector3) -> float; rail_point(offset: float) -> Vector3; get_rail_offset() -> float; update_camera(target_position: Vector3, delta: float) -> void
Exports
path_node, target_path, lead_distance, follow_speed, look_offset
Placement
res://baltor/godot_components/rail_camera_3d/

Recorded checks

godot 4.7.2.stable.official.ed1daf0bf

  • godot_parse_check_only
  • godot_gdscript_tests
  • godot_tests_reject_gutted_component
  • godot_editor_import
  • godot_contract_reflection
  • godot_example_scene
  • godot_readme_usage_compiles

Limits to consider

Closest-point projection can jump when a rail folds back near itself; keep rails gently curved. The camera does not avoid geometry between it and the target. Verified with Godot 4.7.2 headless; written against the Godot 4.3 API.