public class MotionControllerFly extends MotionControllerBase
Class MotionControllerFly. Provides motioncontrollerfly functionality for the Hytale server.
java.lang.Object > MotionControllerBase > MotionControllerFly
Field Summary
lastVerticalPositionX
Field lastVerticalPositionX.
lastVerticalPositionZ
Field lastVerticalPositionZ.
lastSpeed
Field lastSpeed.
lastRoll
Field lastRoll.
currentRelativeSpeed
Field currentRelativeSpeed.
minSpeedAfterForceSquared
Field minSpeedAfterForceSquared.
desiredAltitudeOverride
Field desiredAltitudeOverride.
maxFallSpeed
Field maxFallSpeed.
onGround
Field onGround.
yaw
Field yaw.
pitch
Field pitch.
dirX
Field dirX.
dirZ
Field dirZ.
dotXZ
Field dotXZ.
maxRotationAngle
Field maxRotationAngle.
newYaw
Field newYaw.
newPitch
Field newPitch.
speedLimit
Field speedLimit.
minSpeed
Field minSpeed.
maxSpeed
Field maxSpeed.
mX
Field mX.
mZ
Field mZ.
mL
Field mL.
rollTurnCosine
Field rollTurnCosine.
maxRollTurnAngle
Field maxRollTurnAngle.
maxRollTurnCosine
Field maxRollTurnCosine.
rollTurnStrength
Field rollTurnStrength.
speedFactor
Field speedFactor.
desiredRoll
Field desiredRoll.
dampedRoll
Field dampedRoll.
deltaRoll
Field deltaRoll.
constrainedRoll
Field constrainedRoll.
diffSpeed
Field diffSpeed.
entry
Field entry.
transformComponent
Field transformComponent.
position
Field position.
ix
Field ix.
iz
Field iz.
y
Field y.
world
Field world.
chunkStore
Field chunkStore.
chunkIndex
Field chunkIndex.
chunkRef
Field chunkRef.
chunkStoreAccessor
Field chunkStoreAccessor.
chunkColumnComponent
Field chunkColumnComponent.
blockChunkComponent
Field blockChunkComponent.
iy
Field iy.
below
Field below.
above
Field above.
probeOnly
Field probeOnly.
saveSegments
Field saveSegments.
canAct
Field canAct.
debugPrefix
Field debugPrefix.
collision
Field collision.
adjust
Field adjust.
distance
Field distance.
scale
Field scale.
sinePitch
Field sinePitch.
cosinePitch
Field cosinePitch.
c
Field c.
s
Field s.
Method Detail
MotionControllerFly
public
MotionControllerFly
(@Nonnull final BuilderSupport builderSupport, @Nonnull final BuilderMotionControllerFly builder)
Method MotionControllerFly.
- Parameters:
@Nonnull final BuilderSupportbuilderSupport@Nonnull final BuilderMotionControllerFlybuilder
getType
String
getType
()
Method getType.
computeMove
double
computeMove
(@Nonnull final Ref ref, @Nonnull final Role role, @Nonnull final Steering steering, final double dt, @Nonnull final Vector3d translation, @Nonnull final ComponentAccessor componentAccessor)
Method computeMove.
- Parameters:
@Nonnull final Refref@Nonnull final Rolerole@Nonnull final Steeringsteeringfinal doubledt@Nonnull final Vector3dtranslation@Nonnull final ComponentAccessorcomponentAccessor
IllegalArgumentException
new
IllegalArgumentException
(String.valueOf(translation)
Method IllegalArgumentException.
- Parameters:
String.valueOf(translationString.valueOf(translation
setDirectionFromTranslation
void
setDirectionFromTranslation
(@Nonnull final Steering steering, @Nonnull final Vector3d translation)
Method setDirectionFromTranslation.
- Parameters:
@Nonnull final Steeringsteering@Nonnull final Vector3dtranslation
probeMove
double
probeMove
(@Nonnull final Ref ref, @Nonnull final ProbeMoveData probeMoveData, @Nonnull final ComponentAccessor componentAccessor)
Method probeMove.
- Parameters:
@Nonnull final Refref@Nonnull final ProbeMoveDataprobeMoveData@Nonnull final ComponentAccessorcomponentAccessor
isFastMotionKind
boolean
isFastMotionKind
(final double speed)
Method isFastMotionKind.
- Parameters:
final doublespeed
getDesiredVerticalRange
MotionController.VerticalRange
getDesiredVerticalRange
(@Nonnull final Ref ref, @Nonnull final ComponentAccessor componentAccessor)
Method getDesiredVerticalRange.
- Parameters:
@Nonnull final Refref@Nonnull final ComponentAccessorcomponentAccessor
getWanderVerticalMovementRatio
double
getWanderVerticalMovementRatio
()
Method getWanderVerticalMovementRatio.
doMove
double
doMove
(@Nonnull final Ref ref, @Nonnull final Vector3d position, @Nonnull final Vector3d translation, @Nonnull final PositionProbeAir moveProbe, @Nullable final ProbeMoveData probeMoveData, @Nonnull final ComponentAccessor componentAccessor)
Method doMove.
- Parameters:
@Nonnull final Refref@Nonnull final Vector3dposition@Nonnull final Vector3dtranslation@Nonnull final PositionProbeAirmoveProbe@Nullable final ProbeMoveDataprobeMoveData@Nonnull final ComponentAccessorcomponentAccessor
if
else
if
(saveSegments)
Method if.
- Parameters:
saveSegmentssaveSegments
executeMove
double
executeMove
(@Nonnull final Ref ref, @Nonnull final Role role, double dt, @Nonnull final Vector3d translation, @Nonnull final ComponentAccessor componentAccessor)
Method executeMove.
- Parameters:
@Nonnull final Refref@Nonnull final Roleroledoubledt@Nonnull final Vector3dtranslation@Nonnull final ComponentAccessorcomponentAccessor
constrainRotations
Method constrainRotations.
- Parameters:
final Rolerolefinal TransformComponenttransform
getCurrentMaxBodyRotationSpeed
double
getCurrentMaxBodyRotationSpeed
()
Method getCurrentMaxBodyRotationSpeed.
dampForceVelocity
void
dampForceVelocity
(@Nonnull final Vector3d forceVelocity, final double forceVelocityDamping, final double interval, final ComponentAccessor componentAccessor)
Method dampForceVelocity.
- Parameters:
@Nonnull final Vector3dforceVelocityfinal doubleforceVelocityDampingfinal doubleintervalfinal ComponentAccessorcomponentAccessor
shouldDampenAppliedVelocitiesY
boolean
shouldDampenAppliedVelocitiesY
()
Method shouldDampenAppliedVelocitiesY.
shouldAlwaysUseGroundResistance
boolean
shouldAlwaysUseGroundResistance
()
Method shouldAlwaysUseGroundResistance.
spawned
void
spawned
()
Method spawned.
canAct
Method canAct.
- Parameters:
@Nonnull final Refref@Nonnull final ComponentAccessorcomponentAccessor
inAir
boolean
inAir
()
Method inAir.
onGround
boolean
onGround
()
Method onGround.
inWater
boolean
inWater
()
Method inWater.
getCurrentSpeed
double
getCurrentSpeed
()
Method getCurrentSpeed.
getCurrentTurnRadius
double
getCurrentTurnRadius
()
Method getCurrentTurnRadius.
getMaxClimbAngle
float
getMaxClimbAngle
()
Method getMaxClimbAngle.
getMaxSinkAngle
float
getMaxSinkAngle
()
Method getMaxSinkAngle.
getMaximumSpeed
double
getMaximumSpeed
()
Method getMaximumSpeed.
is2D
boolean
is2D
()
Method is2D.
canRestAtPlace
boolean
canRestAtPlace
()
Method canRestAtPlace.
getDesiredAltitudeWeight
double
getDesiredAltitudeWeight
()
Method getDesiredAltitudeWeight.
getHeightOverGround
double
getHeightOverGround
()
Method getHeightOverGround.
isHorizontalIdle
boolean
isHorizontalIdle
(final double speed)
Method isHorizontalIdle.
- Parameters:
final doublespeed
estimateVelocity
Method estimateVelocity.
- Parameters:
final Steeringsteering@Nonnull final Vector3dvelocityOut
clearOverrides
void
clearOverrides
()
Method clearOverrides.
setDesiredAltitudeOverride
void
setDesiredAltitudeOverride
(final double[] desiredAltitudeOverride)
Method setDesiredAltitudeOverride.
- Parameters:
final double[]desiredAltitudeOverride
takeOff
void
takeOff
(@Nonnull final Ref ref, final double speed, @Nonnull final ComponentAccessor componentAccessor)
Method takeOff.
- Parameters:
@Nonnull final Refreffinal doublespeed@Nonnull final ComponentAccessorcomponentAccessor
getMinSpeedAfterForceSquared
double
getMinSpeedAfterForceSquared
()
Method getMinSpeedAfterForceSquared.
getDampingDeceleration
double
getDampingDeceleration
()
Method getDampingDeceleration.
computeMaxSpeedFromPitch
double
computeMaxSpeedFromPitch
(final double pitch)
Method computeMaxSpeedFromPitch.
- Parameters:
final doublepitch