BodyMotionMoveAway

public class BodyMotionMoveAway extends BodyMotionFindWithTarget

Class BodyMotionMoveAway. Provides bodymotionmoveaway functionality for the Hytale server.

java.lang.Object > BodyMotionFindWithTarget > BodyMotionMoveAway

Field Summary

fleeDirection

protected float fleeDirection

Field fleeDirection.

holdDirectionTimeRemaining

protected double holdDirectionTimeRemaining

Field holdDirectionTimeRemaining.

erraticDistance

final double erraticDistance

Field erraticDistance.

erraticExtraJitter

final float erraticExtraJitter

Field erraticExtraJitter.

npcComponent

final NPCEntity npcComponent

Field npcComponent.

speedMultiplier

final float speedMultiplier

Field speedMultiplier.

transformComponent

final TransformComponent transformComponent

Field transformComponent.

selfPosition

final Vector3d selfPosition

Field selfPosition.

bodyRotation

final Vector3f bodyRotation

Field bodyRotation.

lastTargetPosition

final Vector3d lastTargetPosition

Field lastTargetPosition.

inErraticRange

final boolean inErraticRange

Field inErraticRange.

jitter

final float jitter

Field jitter.

motionController

final MotionController motionController

Field motionController.

desiredAltitudeWeight

final double desiredAltitudeWeight

Field desiredAltitudeWeight.

Method Detail

BodyMotionMoveAway

public public BodyMotionMoveAway (@Nonnull final BuilderBodyMotionMoveAway builderMotionFind, @Nonnull final BuilderSupport support)

Method BodyMotionMoveAway.

Parameters:
@Nonnull final BuilderBodyMotionMoveAway builderMotionFind
@Nonnull final BuilderSupport support

activate

public void activate (@Nonnull final Ref ref, @Nonnull final Role role, @Nonnull final ComponentAccessor componentAccessor)

Method activate.

Parameters:
@Nonnull final Ref ref
@Nonnull final Role role
@Nonnull final ComponentAccessor componentAccessor

computeSteering

public boolean computeSteering (@Nonnull final Ref ref, @Nonnull final Role role, @Nullable final InfoProvider infoProvider, final double dt, @Nonnull final Steering desiredSteering, @Nonnull final ComponentAccessor componentAccessor)

Method computeSteering.

Parameters:
@Nonnull final Ref ref
@Nonnull final Role role
@Nullable final InfoProvider infoProvider
final double dt
@Nonnull final Steering desiredSteering
@Nonnull final ComponentAccessor componentAccessor

isGoalReached

public boolean isGoalReached (final Ref ref, final AStarBase aStarBase, @Nonnull final AStarNode aStarNode, final MotionController motionController, final ComponentAccessor componentAccessor)

Method isGoalReached.

Parameters:
final Ref ref
final AStarBase aStarBase
@Nonnull final AStarNode aStarNode
final MotionController motionController
final ComponentAccessor componentAccessor

estimateToGoal

public float estimateToGoal (@Nonnull final AStarBase aStarBase, final Vector3d fromPosition, @Nonnull final MotionController motionController)

Method estimateToGoal.

Parameters:
@Nonnull final AStarBase aStarBase
final Vector3d fromPosition
@Nonnull final MotionController motionController

findBestPath

public void findBestPath (@Nonnull final AStarBase aStarBase, final MotionController controller)

Method findBestPath.

Parameters:
@Nonnull final AStarBase aStarBase
final MotionController controller