AABB
AlignmentBehavior
ArriveBehavior
AStar
BFS
BoundingSphere
BVH
BVHNode
Cell
CellSpacePartitioning
CohesionBehavior
CompositeGoal
ConvexHull
Corridor
CostTable
DFS
Dijkstra
Edge
EntityManager
EvadeBehavior
EventDispatcher
Behavior
FollowPathBehavior
FuzzyAND
FuzzyCompositeTerm
FuzzyFAIRLY
FuzzyModule
FuzzyOR
FuzzyRule
FuzzySet
FuzzyTerm
FuzzyVariable
FuzzyVERY
GameEntity
Goal
GoalEvaluator
Graph
GraphUtils
HalfEdge
HeuristicPolicyDijkstra
HeuristicPolicyEuclid
HeuristicPolicyEuclidSquared
HeuristicPolicyManhattan
InterposeBehavior
LeftSCurveFuzzySet
LeftShoulderFuzzySet
LineSegment
Logger
MathUtils
Matrix3
Matrix4
MemoryRecord
MemorySystem
MeshGeometry
MessageDispatcher
MovingEntity
NavEdge
NavMesh
NavMeshLoader
NavNode
Node
NormalDistFuzzySet
OBB
ObstacleAvoidanceBehavior
OffsetPursuitBehavior
OnPathBehavior
Path
Plane
Polygon
Polyhedron
PriorityQueue
PursuitBehavior
Quaternion
Ray
RectangleTriggerRegion
Regular
RightSCurveFuzzySet
RightShoulderFuzzySet
SAT
SeekBehavior
SeparationBehavior
SingletonFuzzySet
Smoother
SphericalTriggerRegion
State
StateMachine
SteeringBehavior
SteeringManager
Task
TaskQueue
Telegram
Think
Time
TriangularFuzzySet
Trigger
TriggerRegion
Vector3
Vehicle
Version
WanderBehavior

maxTurnRate

概述

maxTurnRateVehicle类中的一个参数,表示车辆最大的转向速率。

使用方法

在使用maxTurnRate参数时,需对Vehicle类进行实例化。示例代码如下:

let myVehicle = new Vehicle();
myVehicle.maxTurnRate = 3;

参数说明

maxTurnRate的单位为度/秒。例如,若将maxTurnRate设置为3,则该车辆的转向速率为3度/秒。当该车辆需要偏离当前方向时,它会尽可能接近想要去的目的地。但是,由于参数maxTurnRate的限制,它的转向速率有一定的上限。

建议

由于maxTurnRate的值不应过大,否则可能导致车辆转向不稳定,因此建议在使用maxTurnRate参数时,根据实际需求进行设置。通常情况下,小型车辆的maxTurnRate参数应该在1-5度/秒之间。