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

Flight Mechanics is responsible for converting user input into manipulating the wing for various physics effects. It handles the math behind flapping, flarring, and diving to change how physics effects the flight object. It does NOT directly interact with the user, ever. Instead, it's intended that the main free flight script pass in all user input, and call methods from here through Fixed Update()
상속: FreeFlightPhysics
파일 보기 프로젝트 열기: NickolausDS/Unity-Free-Flight 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
currentFlapTime float
isFlapping bool

공개 메소드들

메소드 설명
CreatureFlightPhysics ( Rigidbody rb ) : System.Collections
directionalInput ( float bank, float pitch, float sensitivity ) : void
execute ( CreatureFlightPhysics controller ) : void
flap ( float minFlapTime, float regFlapTime, float flapStrength, float downBeatStrength, bool regFlap, bool quickFlap ) : void

Try to execute a flap. A regular flap can only happen in regular intervals determined by regFlapTime. A quickFlap is faster, and can happen in minFlapTime intervals or regular flaptime intervals. If we are not flapping, and the wings are open, we are guaranteed a flap.

thrust ( float forceNewtons ) : void
wingFold ( float left, float right ) : void

비공개 메소드들

메소드 설명
getAOAForZeroLCOF ( ) : float

메소드 상세

CreatureFlightPhysics() 공개 메소드

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

directionalInput() 공개 메소드

public directionalInput ( float bank, float pitch, float sensitivity ) : void
bank float
pitch float
sensitivity float
리턴 void

execute() 공개 메소드

public execute ( CreatureFlightPhysics controller ) : void
controller CreatureFlightPhysics
리턴 void

flap() 공개 메소드

Try to execute a flap. A regular flap can only happen in regular intervals determined by regFlapTime. A quickFlap is faster, and can happen in minFlapTime intervals or regular flaptime intervals. If we are not flapping, and the wings are open, we are guaranteed a flap.
public flap ( float minFlapTime, float regFlapTime, float flapStrength, float downBeatStrength, bool regFlap, bool quickFlap ) : void
minFlapTime float Minimum flap time.
regFlapTime float Reg flap time.
flapStrength float Flap strength.
downBeatStrength float
regFlap bool
quickFlap bool If set to true quick flap.
리턴 void

thrust() 공개 메소드

public thrust ( float forceNewtons ) : void
forceNewtons float
리턴 void

wingFold() 공개 메소드

public wingFold ( float left, float right ) : void
left float
right float
리턴 void

프로퍼티 상세

currentFlapTime 보호되어 있는 프로퍼티

protected float currentFlapTime
리턴 float

isFlapping 보호되어 있는 프로퍼티

protected bool isFlapping
리턴 bool