public IntPtr SetupInitialProperties() { wheelCentre = Vector3.up * -suspensionDistance * suspensionSpringTargetPosition; wheel = PhysXLib.CreateWheelData(); PhysXLib.SetWheelMass(wheel, mass); PhysXLib.SetWheelRadius(wheel, radius); PhysXLib.SetWheelDampingRate(wheel, dampingRate); PhysXLib.SetWheelMomentOfInertia(wheel, 0.5f * mass * radius * radius); PhysXLib.SetWheelWidth(wheel, width); tire = PhysXLib.CreateTireData(); PhysXLib.SetTireBaseFriction(tire, baseForwardFriction); PhysXLib.SetTireMaxFrictionSlipPoint(tire, extremumForwardSlip); PhysXLib.SetTireMaxFriction(tire, extremumForwardFriction); PhysXLib.SetTirePlateuxSlipPoint(tire, asymptoteForwardSlip); PhysXLib.SetTirePlateuxFriction(tire, asymptoteForwardFriction); PhysXLib.SetTireLongitudinalStiffnessScale(tire, forwardStiffness); PhysXLib.SetTireLateralStiffnessMaxLoad(tire, asymptoteSidewaysTireLoad); PhysXLib.SetTireMaxLateralStiffness(tire, _asymptoteSidewaysStiffness); suspension = PhysXLib.CreateSuspensionData(); PhysXLib.SetSuspensionMaxCompression(suspension, suspensionDistance * suspensionSpringTargetPosition); PhysXLib.SetSuspensionMaxDroop(suspension, suspensionDistance * (1 - suspensionSpringTargetPosition)); PhysXLib.SetSuspensionSpringStrength(suspension, suspensionSpringStrength); PhysXLib.SetSuspensionSpringDamper(suspension, suspensionSpringDamper); return(suspension); }