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 BuilderBodyMotionMoveAwaybuilderMotionFind@Nonnull final BuilderSupportsupport
activate
public
void
activate
(@Nonnull final Ref ref, @Nonnull final Role role, @Nonnull final ComponentAccessor componentAccessor)
Method activate.
- Parameters:
@Nonnull final Refref@Nonnull final Rolerole@Nonnull final ComponentAccessorcomponentAccessor
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 Refref@Nonnull final Rolerole@Nullable final InfoProviderinfoProviderfinal doubledt@Nonnull final SteeringdesiredSteering@Nonnull final ComponentAccessorcomponentAccessor
isGoalReached
public
boolean
isGoalReached
(final Ref ref, final AStarBase aStarBase, @Nonnull final AStarNode aStarNode, final MotionController motionController, final ComponentAccessor componentAccessor)
Method isGoalReached.
- Parameters:
final Refreffinal AStarBaseaStarBase@Nonnull final AStarNodeaStarNodefinal MotionControllermotionControllerfinal ComponentAccessorcomponentAccessor
estimateToGoal
public
float
estimateToGoal
(@Nonnull final AStarBase aStarBase, final Vector3d fromPosition, @Nonnull final MotionController motionController)
Method estimateToGoal.
- Parameters:
@Nonnull final AStarBaseaStarBasefinal Vector3dfromPosition@Nonnull final MotionControllermotionController
findBestPath
Method findBestPath.
- Parameters:
@Nonnull final AStarBaseaStarBasefinal MotionControllercontroller