IDriverView
Interface · Namespace OMX.ModAPI · Assembly OMX.ModAPI.Shared.dll
public interface IDriverViewThe local player’s adjustments to the driver view (F1): where their head sits in the cab, the field of view, and the head turning with the steering. The values are the player’s own settings, the same ones the in-game Driver view panel changes, so anything set here is saved with them; IDriverView.ExtraLookDegrees is the exception, for code that steers the view itself (head tracking, for example), and is never saved.
Properties
Section titled “Properties”CurrentLookDegrees
Section titled “CurrentLookDegrees”float CurrentLookDegrees { get; }The turn the driver view has this frame from steering and IDriverView.ExtraLookDegrees, degrees.
Enabled
Section titled “Enabled”bool Enabled { get; set; }The master switch. Off, the driver view is OMSI’s own: no head offset, field of view change or look, IDriverView.ExtraLookDegrees included. The other values are kept and still settable.
ExtraLookDegrees
Section titled “ExtraLookDegrees”float ExtraLookDegrees { get; set; }A turn added on top of everything else, degrees, positive right. Not saved; limited to ±180.
FieldOfViewOffsetDegrees
Section titled “FieldOfViewOffsetDegrees”float FieldOfViewOffsetDegrees { get; set; }Degrees added to the driver camera’s field of view, limited to ±40.
HeadOffset
Section titled “HeadOffset”Vector3 HeadOffset { get; set; }The head relative to the vehicle’s own driver camera, in metres: X towards the vehicle’s right, Y up, Z towards its front. Each component is limited to ±1 m.
LookDeadzone
Section titled “LookDeadzone”float LookDeadzone { get; set; }How much of the turn is ignored before the head starts to look (0..0.5), so small corrections on a straight road leave the view still. The head turns with the bend the bus is steering along, looking further ahead the faster it goes, not with the wheel’s share of full lock.
LookWithSteering
Section titled “LookWithSteering”bool LookWithSteering { get; set; }Whether the head turns towards the side being steered to.
MaxLookLeftDegrees
Section titled “MaxLookLeftDegrees”float MaxLookLeftDegrees { get; set; }The head’s turn at full left lock, degrees (0..90).
MaxLookRightDegrees
Section titled “MaxLookRightDegrees”float MaxLookRightDegrees { get; set; }The head’s turn at full right lock, degrees (0..90).
Vehicle
Section titled “Vehicle”string? Vehicle { get; }The current vehicle file the head position belongs to (relative to the OMSI directory), or null with no vehicle loaded. Head position and field of view are kept per vehicle.
Methods
Section titled “Methods”ResetHead
Section titled “ResetHead”void ResetHead();Puts the head position and field of view of the current vehicle back to the vehicle’s own.
