本文整理汇总了C#中CelestialBody.gravity方法的典型用法代码示例。如果您正苦于以下问题:C# CelestialBody.gravity方法的具体用法?C# CelestialBody.gravity怎么用?C# CelestialBody.gravity使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CelestialBody
的用法示例。
在下文中一共展示了CelestialBody.gravity方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: UpdatePosition
protected override Vector3 UpdatePosition()
{
if (EditorLogic.RootPart == null) {
/* DragCubes can get NaNed without this check */
return Vector3.zero;
}
if (RCSBuildAid.Mode != PluginMode.Parachutes) {
return Vector3.zero;
}
hasParachutes = RCSBuildAid.Parachutes.Count > 0;
body = Settings.selected_body;
altitude = MenuParachutes.altitude;
temperature = body.GetTemperature (altitude);
pressure = body.GetPressure (altitude);
density = body.GetDensity (pressure, temperature);
mach = (float)(speed / body.GetSpeedOfSound(pressure, density));
gravity = body.gravity(altitude);
findCenterOfDrag();
speed = Vt = calculateTerminalVelocity ();
/* unless I go at mach speeds I don't care about this
reynolds = (float)(density * speed);
reynoldsDragMult = PhysicsGlobals.DragCurvePseudoReynolds.Evaluate (reynolds);
*/
dragForce.Vector = calculateDragForce ();
return position;
}