public class BodyMotionMaintainDistance extends BodyMotionBase
Class BodyMotionMaintainDistance. Provides bodymotionmaintaindistance functionality for the Hytale server.
java.lang.Object > BodyMotionBase > BodyMotionMaintainDistance
Field Summary
targetDistanceSquared
Field targetDistanceSquared.
approaching
Field approaching.
movingAway
Field movingAway.
strafingDirection
Field strafingDirection.
strafingDelay
Field strafingDelay.
pauseStrafing
Field pauseStrafing.
cachedMinRangeProvider
Field cachedMinRangeProvider.
cachedMaxRangeProvider
Field cachedMaxRangeProvider.
cachedPositioningAngleProvider
Field cachedPositioningAngleProvider.
initialised
Field initialised.
min
Field min.
max
Field max.
value
Field value.
before
Field before.
npcComponent
Field npcComponent.
transformComponent
Field transformComponent.
positionProvider
Field positionProvider.
selfPosition
Field selfPosition.
distanceSquared
Field distanceSquared.
targetDistance
Field targetDistance.
activeMotionController
Field activeMotionController.
x
Field x.
z
Field z.
motionController
Field motionController.
targetRef
Field targetRef.
targetTransformComponent
Field targetTransformComponent.
selfYaw
Field selfYaw.
difference
Field difference.
translation
Field translation.
newX
Field newX.
newZ
Field newZ.
Method Detail
BodyMotionMaintainDistance
public
BodyMotionMaintainDistance
(@Nonnull final BuilderBodyMotionMaintainDistance builder, @Nonnull final BuilderSupport support)
Method BodyMotionMaintainDistance.
- Parameters:
@Nonnull final BuilderBodyMotionMaintainDistancebuilder@Nonnull final BuilderSupportsupport
computeSteering
boolean
computeSteering
(@Nonnull final Ref ref, @Nonnull final Role support, @Nullable final InfoProvider sensorInfo, final double dt, @Nonnull final Steering desiredSteering, @Nonnull final ComponentAccessor componentAccessor)
Method computeSteering.
- Parameters:
@Nonnull final Refref@Nonnull final Rolesupport@Nullable final InfoProvidersensorInfofinal doubledt@Nonnull final SteeringdesiredSteering@Nonnull final ComponentAccessorcomponentAccessor
if
else
if
(distanceSquared < this.thresholdDistanceRangeSquared[0] || (this.movingAway && distanceSquared < this.targetDistanceSquared)
Method if.
- Parameters:
distanceSquared < this.thresholdDistanceRangeSquared[0] || (this.movingAway && distanceSquared <this.targetDistanceSquared
tickStrafingDelay
boolean
tickStrafingDelay
(final double dt)
Method tickStrafingDelay.
- Parameters:
final doubledt
deactivate
void
deactivate
(@Nonnull final Ref ref, @Nonnull final Role role, @Nonnull final ComponentAccessor componentAccessor)
Method deactivate.
- Parameters:
@Nonnull final Refref@Nonnull final Rolerole@Nonnull final ComponentAccessorcomponentAccessor