C# 클래스 FreeFlightPhysics, Unity-Free-Flight

Simulate the flow of air around an airfoil. This class applies passive forces on a flight object, such as lift and drag. It only applies these forces based on the current state of the wing, but never changes the actual wing itself (so no flapping).
상속: FlightObject
파일 보기 프로젝트 열기: NickolausDS/Unity-Free-Flight 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
dragEnabled bool
gravityEnabled bool
liftEnabled bool

보호된 프로퍼티들

프로퍼티 타입 설명
rigidbody UnityEngine.Rigidbody

공개 메소드들

메소드 설명
FreeFlightPhysics ( Rigidbody rb ) : System.Collections
doStandardPhysics ( ) : void

Apply the regular flight physics to the flight object. Precondition: This must be called at regular intervals to have a smooth effect on the physics object (use FixedUpdate).

getAngleOfAttack ( Quaternion theCurrentRotation, Vector3 theCurrentVelocity ) : float
getBankedTurnRotation ( Quaternion theCurrentRotation ) : Quaternion
getDirectionalVelocity ( Quaternion theCurrentRotation, Vector3 theCurrentVelocity ) : Vector3
getDrag ( float velocity, float pressure, float area, float dragCoff, float lift, float aspectR ) : float

Get the current drag force on the object based on the parameters. All dimensions must be in metric.

getDragCoefficient ( float angleDegrees ) : float
getLift ( float velocity, float pressure, float area, float liftCoff ) : float

Get the current lift force on the object based on the paramaters. All dimensions must be in metric.

getLiftCoefficient ( float angleDegrees ) : float
getStallRotation ( Quaternion curRot, float velocity ) : Quaternion

메소드 상세

FreeFlightPhysics() 공개 메소드

public FreeFlightPhysics ( Rigidbody rb ) : System.Collections
rb UnityEngine.Rigidbody
리턴 System.Collections

doStandardPhysics() 공개 메소드

Apply the regular flight physics to the flight object. Precondition: This must be called at regular intervals to have a smooth effect on the physics object (use FixedUpdate).
public doStandardPhysics ( ) : void
리턴 void

getAngleOfAttack() 공개 메소드

public getAngleOfAttack ( Quaternion theCurrentRotation, Vector3 theCurrentVelocity ) : float
theCurrentRotation Quaternion
theCurrentVelocity Vector3
리턴 float

getBankedTurnRotation() 공개 메소드

public getBankedTurnRotation ( Quaternion theCurrentRotation ) : Quaternion
theCurrentRotation Quaternion
리턴 Quaternion

getDirectionalVelocity() 공개 메소드

public getDirectionalVelocity ( Quaternion theCurrentRotation, Vector3 theCurrentVelocity ) : Vector3
theCurrentRotation Quaternion
theCurrentVelocity Vector3
리턴 Vector3

getDrag() 공개 메소드

Get the current drag force on the object based on the parameters. All dimensions must be in metric.
public getDrag ( float velocity, float pressure, float area, float dragCoff, float lift, float aspectR ) : float
velocity float Velocity Meters/Second
pressure float Pressure (something)
area float Area Meters^2
dragCoff float Drag coff (dimensionless)
lift float Lift Newtons
aspectR float Aspect r. (dimensionless)
리턴 float

getDragCoefficient() 공개 메소드

public getDragCoefficient ( float angleDegrees ) : float
angleDegrees float
리턴 float

getLift() 공개 메소드

Get the current lift force on the object based on the paramaters. All dimensions must be in metric.
public getLift ( float velocity, float pressure, float area, float liftCoff ) : float
velocity float Velocity Meters/Second
pressure float Pressure (something)
area float Area Meters^2
liftCoff float Lift coff. (dimensionless)
리턴 float

getLiftCoefficient() 공개 메소드

public getLiftCoefficient ( float angleDegrees ) : float
angleDegrees float
리턴 float

getStallRotation() 공개 메소드

public getStallRotation ( Quaternion curRot, float velocity ) : Quaternion
curRot Quaternion
velocity float
리턴 Quaternion

프로퍼티 상세

dragEnabled 공개적으로 프로퍼티

public bool dragEnabled
리턴 bool

gravityEnabled 공개적으로 프로퍼티

public bool gravityEnabled
리턴 bool

liftEnabled 공개적으로 프로퍼티

public bool liftEnabled
리턴 bool

rigidbody 보호되어 있는 프로퍼티

protected Rigidbody,UnityEngine rigidbody
리턴 UnityEngine.Rigidbody