Exemplo n.º 1
0
        /// On construction the physical/collision objects are created, but
        /// not registered
        public Car(bool FWDrive, bool RWDrive, float maxSteerAngle, float steerRate, float wheelSideFriction,
             float wheelFwdFriction, float wheelTravel, float wheelRadius, float wheelZOffset, float wheelRestingFrac,
             float wheelDampingFrac, int wheelNumRays, float driveTorque, float gravity)
        {
            this.fWDrive = FWDrive;
            this.bWDrive = RWDrive;
            this.maxSteerAngle = maxSteerAngle;
            this.steerRate = steerRate;
            this.wheelSideFriction = wheelSideFriction;
            this.wheelFwdFriction = wheelFwdFriction;
            this.wheelTravel = wheelTravel;
            this.wheelRadius = wheelRadius;
            this.wheelZOffset = wheelZOffset;
            this.wheelRestingFrac = wheelRestingFrac;
            this.wheelDampingFrac = wheelDampingFrac;
            this.wheelNumRays = wheelNumRays;
            this.driveTorque = driveTorque;
            this.gravity = gravity;

            chassis = new Chassis(this);

            SetupDefaultWheels();
        }
Exemplo n.º 2
0
 public void DisableCar() => Chassis?.DisableChassis();
Exemplo n.º 3
0
 public void EnableCar() => Chassis?.EnableChassis();