Exemplo n.º 1
0
        public void Start()
        {
            wheelCollider           = gameObject.AddComponent <KSPWheelCollider>();
            wheelCollider.rigidbody = this.rigidBody;
            bumpStopCollider        = new GameObject("BSC-" + wheelCollider.name);
            SphereCollider sc  = bumpStopCollider.AddComponent <SphereCollider>();
            PhysicMaterial mat = new PhysicMaterial("TEST");

            mat.bounciness      = 0.0f;
            mat.dynamicFriction = 0;
            mat.staticFriction  = 0;
            sc.material         = mat;
            OnValidate();//manually call to set all current parameters into wheel collider object
        }
Exemplo n.º 2
0
 internal void onWheelCreated(Transform transform, KSPWheelCollider collider)
 {
     this.wheelTransform = transform;
     this.wheel          = collider;
     postWheelCreated();
 }