PowerHorse Engine
    Preparing search index...

    It is recommended that you initial have your target Vehicle Model in a state where no physics is applied. This can be for e.g. anchoring all moving parts or placing into ReplicatedStorage. Then after the ChassisRig is applied, reapply physics.

    Hierarchy

    • Pseudo<{ MainServant: Servant }>
      • VehicleChassisRig
    Index

    Constructors

    Properties

    AutoBikeZAxisRotation: boolean = CONSTS.VehicleDefaults.AutoBikeZAxisRotation
    AutoBikeZAxisRotationAngle: number = CONSTS.VehicleDefaults.AutoBikeZAxisRotationAngle
    AutoFlipChassis: number | boolean = CONSTS.VehicleDefaults.AutoFlipChassis
    AutomaticNetworkOwnership: undefined | VehicleSeat = undefined
    BikeOrientationMaxTorque: number = CONSTS.VehicleDefaults.BikeOrientationMaxTorque
    BikeOrientationResponsiveness: number = CONSTS.VehicleDefaults.BikeOrientationResponsiveness
    BikeXAxisRotation: number = CONSTS.VehicleDefaults.BikeXAxisRotation
    BikeYAxisRotation: number = CONSTS.VehicleDefaults.BikeYAxisRotation
    BikeZAxisRotation: number = CONSTS.VehicleDefaults.BikeZAxisRotation
    ChassisType: VehicleChassisTypes = "Car"
    CreatePhysicalWheelPointerValues: boolean = CONSTS.VehicleDefaults.CreatePhysicalWheelPointerValues
    CylindricalLimitsEnabled: boolean = CONSTS.VehicleDefaults.CylindricalLimitsEnabled
    CylindricalLowerLimit: number = CONSTS.VehicleDefaults.CylindricalLowerLimit
    CylindricalUpperLimit: number = CONSTS.VehicleDefaults.CylindricalUpperLimit
    Mass: number = CONSTS.VehicleDefaults.Mass

    Having mass set to a number will create parts needed with the density welded to the Main of the vehicle. Since the density of a Part is limited to 100, If you were to need a Mass of 300, 3 100 dense parts will be created.

    MassRelativeOffset: Vector3 = CONSTS.VehicleDefaults.MassRelativeOffset
    MaxSpeed: number = CONSTS.VehicleDefaults.MaxSpeed
    MaxSteerAngle: number = CONSTS.VehicleDefaults.MaxSteerAngle
    MaxSteerAngleDecay: number = CONSTS.VehicleDefaults.MaxSteerAngleDecay

    `MaxSteeringAngle - [MaxSteerAngleDecay] * [CurrentVelocity]

    ** This only works when the a client has control over the chassis! SteeringDecay does not occur on a server controlled chassis **

    ReverseMaxSpeed: undefined | number = CONSTS.VehicleDefaults.ReverseMaxSpeed
    ReverseTorque: undefined | number = CONSTS.VehicleDefaults.ReverseTorque
    ShowMassInstances: boolean = CONSTS.VehicleDefaults.ShowMassInstances
    Spring: boolean = CONSTS.VehicleDefaults.Spring
    SpringDamping: number = CONSTS.VehicleDefaults.SpringDamping
    SpringFreeLength: number = CONSTS.VehicleDefaults.SpringFreeLength
    SpringLimitsEnabled: boolean = CONSTS.VehicleDefaults.SpringLimitsEnabled
    SpringMaxForce: number = CONSTS.VehicleDefaults.SpringMaxForce
    SpringMaxLength: number = CONSTS.VehicleDefaults.SpringMaxLength
    SpringMinLength: number = CONSTS.VehicleDefaults.SpringMinLength
    SpringStiffness: number = CONSTS.VehicleDefaults.SpringStiffness
    SteerFloat: number = CONSTS.VehicleDefaults.SteerFloat
    ThrottleFloat: number = CONSTS.VehicleDefaults.ThrottleFloat
    Torque: number = CONSTS.VehicleDefaults.Torque
    TurnSpeed: number = CONSTS.VehicleDefaults.TurnSpeed
    WheelRigsSpringsVisible: boolean = CONSTS.VehicleDefaults.WheelSpringsVisible
    WheelRigsVisible: boolean = CONSTS.VehicleDefaults.WheelsVisible
    WheelsRigsShape: PartType = CONSTS.VehicleDefaults.WheelShape

    Methods

    • Uses the values from the DrvieSeat like the SteerFloat, ThrottleFloat Torque, MaxSpeed, TurnSpeed.

      Parameters

      • VehicleSeat: VehicleSeat
      • OptionalCustomProperties: (keyof VehicleSeat)[]

        Determine what properties to use instead of the default SteerFloat, ThrottleFloat Torque, MaxSpeed, TurnSpeed.

      Returns ServantNext

    • Parameters

      • Stiffness: number
      • Mass: number
      • TotalWheels: number = 4
      • Consts: number = 0.5

      Returns number

    • Parameters

      • Mass: number
      • Stiffness: number
      • TotalWheels: number
      • DampingCONSTS: number = 0.5

      Returns number

    • Parameters

      • Mass: number
      • TotalWheels: number
      • Gravity: number
      • DesiredSuspensionHeight: number

      Returns number

    • Returns the Spring Stiffness and Spring Damping in that order.

      Parameters

      • Mass: number
      • TotalWheels: number
      • Gravity: number
      • DesiredSuspensionHeight: number
      • OptionalDampingCONSTS: number

      Returns LuaTuple<[number, number]>

    • This is to get the TotalMass of the assembly, not to be mistaken with the Mass property.

      Parameters

      • Entry: Instance

        Defaults to Main.Parent

      • OptionalIgnore: Instance[]

      Returns number

    • Parameters

      • Anchored: boolean
      • OptionalAssemblyInstances: Instance[]

      Returns void

    • Parameters

      • Density: number | PhysicalProperties
      • OptionalAssembly: Instance[]

        Defaults to the children of the Parent of Main

      • OptionalIgnore: Instance[]

        Defaults to [Main, VehicleChassisRig.GetRef()]

      Returns void

    • SetAssemblyDensity(0) may be a better option that making everything massless. This will make every BasePart of the assembly massless except for the Main and anything within the VehicleChassisRig Ref, e.g. Physical Wheels and custom masses from the Mass property.

      It is recommended that the Main have some sort of mass for physics, You can set the Density of the Main to 0.01.

      Parameters

      • Massless: boolean

      Returns void

    • Useful for making character Massless when inside the vehicle, then back to default when they leave.

      Parameters

      • Character: Model
      • Massless: boolean

      Returns void

    • This will set the Network Ownership of Main and is also responsible for creating a VehicleChassisRigClientProxy on the client that is binded to this VehicleChassisRig, and physics will instead be handled by the client instead of the server.

      Changing the following properties will update on the client: Torque,ReverseTorque,MaxSpeed,ReverseMaxSpeed,MaxSteerAngle,TurnSpeed.

      The ThrottleFloat and SteerFloat are obtained by the vehicleSeat.

      Returns void

    • This will set the Network Ownership of Main and is also responsible for creating a VehicleChassisRigClientProxy on the client that is binded to this VehicleChassisRig, and physics will instead be handled by the client instead of the server.

      Changing the following properties will update on the client: Torque,ReverseTorque,MaxSpeed,ReverseMaxSpeed,MaxSteerAngle,TurnSpeed.

      The ThrottleFloat and SteerFloat are obtained by the vehicleSeat.

      Parameters

      • client: Player
      • VehicleSeat: VehicleSeat

      Returns void

    • This will set the Network Ownership of Main and is also responsible for creating a VehicleChassisRigClientProxy on the client that is binded to this VehicleChassisRig, and physics will instead be handled by the client instead of the server.

      Changing the following properties will update on the client: Torque,ReverseTorque,MaxSpeed,ReverseMaxSpeed,MaxSteerAngle,TurnSpeed.

      The ThrottleFloat and SteerFloat are obtained by the vehicleSeat.

      Parameters

      • client: undefined
      • VehicleSeat: VehicleSeat

      Returns void

    • Setting what "Environment" runtime should the VehicleChassisRigClientProxy use, If you're using a roblox-ts compiled game, You do not need to worry about setting this. However if you're using this package inside a native ROBLOX project, you will need to use the native runtime environment. You should set it before you ever call SetNetworkOwnership with a client argument.

      Parameters

      Returns void

    • Parameters

      • Size: Vector3 | Model | BasePart

      Returns void

    • Weld parts together.

      Parameters

      • Instances: Instance[]
      • To: BasePart
      • OptionalIgnore: Instance[]

      Returns void