public class MotionControllerDive extends MotionControllerBase
Class MotionControllerDive. Provides motioncontrollerdive functionality for the Hytale server.
java.lang.Object > MotionControllerBase > MotionControllerDive
Field Summary
swimDepth
Field swimDepth.
climbSpeed
Field climbSpeed.
currentRelativeSpeed
Field currentRelativeSpeed.
collisionWithSolid
Field collisionWithSolid.
minSpeedAfterForceSquared
Field minSpeedAfterForceSquared.
waterLevel
Field waterLevel.
groundY
Field groundY.
lowY
Field lowY.
transformComponent
Field transformComponent.
y
Field y.
dir
Field dir.
maxVerticalSpeed
Field maxVerticalSpeed.
hSpeed
Field hSpeed.
vSpeed
Field vSpeed.
maxRotation
Field maxRotation.
isMoving
Field isMoving.
maxSpeed
Field maxSpeed.
onGround
Field onGround.
velocityComponent
Field velocityComponent.
entry
Field entry.
epsilonAngle
Field epsilonAngle.
canAct
Field canAct.
collision
Field collision.
saveSegments
Field saveSegments.
probePosition
Field probePosition.
probeMovement
Field probeMovement.
collisionModule
Field collisionModule.
maxDistance
Field maxDistance.
collisionStart
Field collisionStart.
Method Detail
MotionControllerDive
public
MotionControllerDive
(@Nonnull final BuilderSupport builderSupport, @Nonnull final BuilderMotionControllerDive builder)
Method MotionControllerDive.
- Parameters:
@Nonnull final BuilderSupportbuilderSupport@Nonnull final BuilderMotionControllerDivebuilder
activate
void
activate
()
Method activate.
getWanderVerticalMovementRatio
double
getWanderVerticalMovementRatio
()
Method getWanderVerticalMovementRatio.
getDesiredVerticalRange
MotionController.VerticalRange
getDesiredVerticalRange
(@Nonnull final Ref ref, @Nonnull final ComponentAccessor componentAccessor)
Method getDesiredVerticalRange.
- Parameters:
@Nonnull final Refref@Nonnull final ComponentAccessorcomponentAccessor
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
shouldDampenAppliedVelocitiesY
boolean
shouldDampenAppliedVelocitiesY
()
Method shouldDampenAppliedVelocitiesY.
shouldAlwaysUseGroundResistance
boolean
shouldAlwaysUseGroundResistance
()
Method shouldAlwaysUseGroundResistance.
computeTranslation
void
computeTranslation
(@Nonnull final Vector3d translation, final double dt, final float heading, final double moveSpeed, final double climbSpeed)
Method computeTranslation.
- Parameters:
@Nonnull final Vector3dtranslationfinal doubledtfinal floatheadingfinal doublemoveSpeedfinal doubleclimbSpeed
isNearZero
boolean
isNearZero
(final float angle)
Method isNearZero.
- Parameters:
final floatangle
executeMove
double
executeMove
(@Nonnull final Ref ref, @Nonnull final Role role, final double dt, @Nonnull final Vector3d translation, @Nonnull final ComponentAccessor componentAccessor)
Method executeMove.
- Parameters:
@Nonnull final Refref@Nonnull final Rolerolefinal doubledt@Nonnull final Vector3dtranslation@Nonnull final ComponentAccessorcomponentAccessor
if
else
if
(this.debugModeMove)
Method if.
- Parameters:
this.debugModeMovethis.debugModeMove
constrainRotations
Method constrainRotations.
- Parameters:
final Rolerole@Nonnull final TransformComponenttransform
getCurrentMaxBodyRotationSpeed
double
getCurrentMaxBodyRotationSpeed
()
Method getCurrentMaxBodyRotationSpeed.
canAct
Method canAct.
- Parameters:
@Nonnull final Refref@Nonnull final ComponentAccessorcomponentAccessor
inAir
boolean
inAir
()
Method inAir.
inWater
boolean
inWater
()
Method inWater.
onGround
boolean
onGround
()
Method onGround.
getType
String
getType
()
Method getType.
bisect
double
bisect
(@Nonnull final Ref ref, @Nonnull final Vector3d validPosition, final double validDistance, @Nonnull final Vector3d invalidPosition, final double invalidDistance, @Nonnull final Vector3d result, @Nonnull final ComponentAccessor componentAccessor)
Method bisect.
- Parameters:
@Nonnull final Refref@Nonnull final Vector3dvalidPositionfinal doublevalidDistance@Nonnull final Vector3dinvalidPositionfinal doubleinvalidDistance@Nonnull final Vector3dresult@Nonnull final ComponentAccessorcomponentAccessor
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
spawned
void
spawned
()
Method spawned.
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.
isFastMotionKind
boolean
isFastMotionKind
(final double speed)
Method isFastMotionKind.
- Parameters:
final doublespeed
is2D
boolean
is2D
()
Method is2D.
canRestAtPlace
boolean
canRestAtPlace
()
Method canRestAtPlace.
getDesiredAltitudeWeight
double
getDesiredAltitudeWeight
()
Method getDesiredAltitudeWeight.
getHeightOverGround
double
getHeightOverGround
()
Method getHeightOverGround.
estimateVelocity
Method estimateVelocity.
- Parameters:
final Steeringsteering@Nonnull final Vector3dvelocityOut
updateModelParameters
void
updateModelParameters
(final Ref ref, final Model model, @Nonnull final Box boundingBox, final ComponentAccessor componentAccessor)
Method updateModelParameters.
- Parameters:
final Refreffinal Modelmodel@Nonnull final BoxboundingBoxfinal ComponentAccessorcomponentAccessor
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
relativeSwimDepthToBoundingBox
double
relativeSwimDepthToBoundingBox
(final double swimDepth, @Nullable final Box boundingBox, final float eyeHeight)
Method relativeSwimDepthToBoundingBox.
- Parameters:
final doubleswimDepth@Nullable final BoxboundingBoxfinal floateyeHeight
relativeSwimDepthToHeight
double
relativeSwimDepthToHeight
(final double swimDepth, @Nullable final Box boundingBox, final float eyeHeight)
Method relativeSwimDepthToHeight.
- Parameters:
final doubleswimDepth@Nullable final BoxboundingBoxfinal floateyeHeight
getDampingDeceleration
double
getDampingDeceleration
()
Method getDampingDeceleration.