Trailer Hitch Module
VehicleController with TrailerHitchModule can attach a VehicleController with TrailerModule as a trailer.
- Both
TrailerHitchModuleandTrailerModulecan be present on one vehicle at the same time. AttachmentPointis the point at which the trailer will be attached. The trailer will be moved so that both trailer and hitchAttachmentPoints are at the same position. This is where the physics joint gets created.Attachment Pointneeds to be a child of theGameObjectcontaining theTrailerHitchModule.- On initialization a SphereCollider trigger is created at the attachment point. This is used to detect if a TrailerModule is nearby. When there is overlap between the
TrailerModuleandTrailerHitchModuletriggers, pressing 'T' (default key mapping) will connect the trailer.
Also check Trailer module.
