예제 #1
0
 void updateAngularDrag()
 {
     _rigidbody.angularDrag = (Mathf.PI * _constval.GetC_AngularDrag() / 5f) * _constval.GetAirDensity()
                              * Mathf.Pow(rotationYVelocity, 2) * Mathf.Pow(((DroneWedth / 2f) + (DroneLength / 2f)) / 2f, 5) +
                              (Mathf.PI * _constval.GetC_AngularDrag() / 5f) * _constval.GetAirDensity()
                              * Mathf.Pow(tiltVelocityForward, 2) * Mathf.Pow(((DroneWedth / 2f) + (DroneLength / 2f)) / 2f, 5) +
                              (Mathf.PI * _constval.GetC_AngularDrag() / 5f) * _constval.GetAirDensity()
                              * Mathf.Pow(tiltVelocitySwerve, 2) * Mathf.Pow(((DroneWedth / 2f) + (DroneLength / 2f)) / 2f, 5);
 }
예제 #2
0
 void valueInitialize()
 {
     _Acceleration          = 0;
     oldXRotation           = transform.rotation.eulerAngles.x;
     oldYRotation           = transform.rotation.eulerAngles.y;
     oldZRotation           = transform.rotation.eulerAngles.z;
     _gravity               = _constval.GetGravity();
     propellerDiameter      = _constval.GetPropellerDiameter();
     propellerVelocity      = _constval.GetAngularVelocity();
     maxRPM                 = _constval.GetMaxRPM();
     airDensity             = _constval.GetAirDensity();
     thrustCoefficient      = _constval.GetC_T();
     powerCoefficient       = _constval.GetC_Pow();
     linearDragCoefficient  = _constval.GetClin();
     AngularDragCoefficient = _constval.GetC_AngularDrag();
 }