예제 #1
0
        public RaycastRobot(VehicleTuning tuning, RigidBody chassis, IVehicleRaycaster raycaster)
        {
            chassisBody      = chassis;
            vehicleRaycaster = raycaster;

            SlidingFriction = 1.0f;
            EffectiveMass   = 1.0f / chassis.InvMass;
        }
예제 #2
0
        /// <summary>
        /// Initializes the RaycastRobot with the given vehicle settings and parent chassis.
        /// </summary>
        /// <param name="tuning"></param>
        /// <param name="chassis"></param>
        /// <param name="raycaster"></param>
        public RaycastRobot(VehicleTuning tuning, RigidBody chassis, IVehicleRaycaster raycaster)
        {
            chassisBody      = chassis;
            RootRigidBody    = chassis;
            vehicleRaycaster = raycaster;

            MaxWheelAngularVelocity = 40f;
            OverrideMass            = 1.0f / chassis.InvMass;
        }
예제 #3
0
 public RaycastVehicle(VehicleTuning tuning, RigidBody chassis, IVehicleRaycaster raycaster)
 {
     m_vehicleRaycaster = raycaster;
     m_pitchControl     = 0f;
     m_chassisBody      = chassis;
     m_indexRightAxis   = 0;
     m_indexUpAxis      = 1;
     m_indexForwardAxis = 2;
     DefaultInit(ref tuning);
 }
 public RaycastVehicle(VehicleTuning tuning, RigidBody chassis, IVehicleRaycaster raycaster)
 {
     m_vehicleRaycaster = raycaster;
     m_pitchControl = 0f;
     m_chassisBody = chassis;
     m_indexRightAxis = 0;
     m_indexUpAxis = 1;
     m_indexForwardAxis = 2;
     DefaultInit(ref tuning);
 }
 public unsafe static object CastRay(this IVehicleRaycaster obj, ref OpenTK.Vector3 from, ref OpenTK.Vector3 to, VehicleRaycasterResult result)
 {
     fixed(OpenTK.Vector3 *fromPtr = &from)
     {
         fixed(OpenTK.Vector3 *toPtr = &to)
         {
             return(obj.CastRay(ref *(BulletSharp.Math.Vector3 *)fromPtr, ref *(BulletSharp.Math.Vector3 *)toPtr, result));
         }
     }
 }
        public CustomVehicle(VehicleTuning tuning, RigidBody chassis, IVehicleRaycaster raycaster)
        {
            chassisBody      = chassis;
            vehicleRaycaster = raycaster;

            using (var ci = new RigidBodyConstructionInfo(0, null, null))
            {
                _fixedBody = new RigidBody(ci);
                _fixedBody.SetMassProps(0, Vector3.Zero);
            }
        }
예제 #7
0
 public CustomVehicle(VehicleTuning tuning, RigidBody chassis, IVehicleRaycaster raycaster)
 {
     chassisBody      = chassis;
     vehicleRaycaster = raycaster;
 }
 public RaycastVehicle(VehicleTuning tuning, RigidBody chassis, IVehicleRaycaster raycaster)
 {
     chassisBody = chassis;
     vehicleRaycaster = raycaster;
 }