abstract class BodyMotionFindWithTarget extends BodyMotionFindBase
Class BodyMotionFindWithTarget. Provides bodymotionfindwithtarget functionality for the Hytale server.
java.lang.Object > BodyMotionFindBase > BodyMotionFindWithTarget
Field Summary
targetBoundingBox
Field targetBoundingBox.
selfBoundingBox
Field selfBoundingBox.
waitForTargetMovement
Field waitForTargetMovement.
haveValidTargetPosition
Field haveValidTargetPosition.
haveAccessibleTargetPosition
Field haveAccessibleTargetPosition.
lastAccessibleTargetPositionIsCurrent
Field lastAccessibleTargetPositionIsCurrent.
self
Field self.
other
Field other.
cosine
Field cosine.
boundingBoxComponent
Field boundingBoxComponent.
positionProvider
Field positionProvider.
targetEntityReference
Field targetEntityReference.
targetEntityBoundingBoxComponent
Field targetEntityBoundingBoxComponent.
npcEntityComponent
Field npcEntityComponent.
movementStatesComponent
Field movementStatesComponent.
entity
Field entity.
distanceSquared
Field distanceSquared.
transformComponent
Field transformComponent.
Method Detail
BodyMotionFindWithTarget
public
BodyMotionFindWithTarget
(@Nonnull final BuilderBodyMotionFindWithTarget builderMotionFindWithTarget, @Nonnull final BuilderSupport support)
Method BodyMotionFindWithTarget.
- Parameters:
@Nonnull final BuilderBodyMotionFindWithTargetbuilderMotionFindWithTarget@Nonnull final BuilderSupportsupport
AStarWithTarget
new
AStarWithTarget
()
Method AStarWithTarget.
activate
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
canComputeMotion
boolean
canComputeMotion
(@Nonnull final Ref ref, @Nonnull final Role role, @Nullable final InfoProvider infoProvider, @Nonnull final ComponentAccessor componentAccessor)
Method canComputeMotion.
- Parameters:
@Nonnull final Refref@Nonnull final Rolerole@Nullable final InfoProviderinfoProvider@Nonnull final ComponentAccessorcomponentAccessor
mustRecomputePath
Method mustRecomputePath.
- Parameters:
@Nonnull final MotionControlleractiveMotionController
if
else
if
(NPCPhysicsMath.isInViewCone(this.conePosition, this.coneDirection, this.cosHalfRecomputeConeAngle, this.getLastTargetPosition()
Method if.
- Parameters:
NPCPhysicsMath.isInViewCone(this.conePositionNPCPhysicsMath.isInViewCone(this.conePositionthis.coneDirectionthis.coneDirectionthis.cosHalfRecomputeConeAnglethis.cosHalfRecomputeConeAnglethis.getLastTargetPosition(this.getLastTargetPosition(
forceRecomputePath
Method forceRecomputePath.
- Parameters:
final MotionControlleractiveMotionController
shouldDeferPathComputation
boolean
shouldDeferPathComputation
(@Nonnull final MotionController motionController, final Vector3d position, @Nonnull final ComponentAccessor componentAccessor)
Method shouldDeferPathComputation.
- Parameters:
@Nonnull final MotionControllermotionControllerfinal Vector3dposition@Nonnull final ComponentAccessorcomponentAccessor
mustAbortThrottling
Method mustAbortThrottling.
- Parameters:
final MotionControllermotionControllerfinal Refref
isGoalReached
boolean
isGoalReached
(final Ref ref, final MotionController activeMotionController, final Vector3d position, final ComponentAccessor componentAccessor)
Method isGoalReached.
- Parameters:
final Refreffinal MotionControlleractiveMotionControllerfinal Vector3dpositionfinal ComponentAccessorcomponentAccessor
startComputePath
AStarBase.Progress
startComputePath
(@Nonnull final Ref ref, final Role role, @Nonnull final MotionController activeMotionController, @Nonnull final Vector3d position, @Nonnull final ComponentAccessor componentAccessor)
Method startComputePath.
- Parameters:
@Nonnull final Refreffinal Rolerole@Nonnull final MotionControlleractiveMotionController@Nonnull final Vector3dposition@Nonnull final ComponentAccessorcomponentAccessor
onBlockedPath
void
onBlockedPath
()
Method onBlockedPath.
onSteering
void
onSteering
(final MotionController activeMotionController, @Nonnull final Ref ref, @Nonnull final ComponentAccessor componentAccessor)
Method onSteering.
- Parameters:
final MotionControlleractiveMotionController@Nonnull final Refref@Nonnull final ComponentAccessorcomponentAccessor
decorateDebugString
void
decorateDebugString
(@Nonnull final StringBuilder dbgString)
Method decorateDebugString.
- Parameters:
@Nonnull final StringBuilderdbgString
getLastAccessibleTargetPosition
Vector3d
getLastAccessibleTargetPosition
(@Nonnull final MotionController motionController, final boolean approximate, @Nonnull final ComponentAccessor componentAccessor)
Method getLastAccessibleTargetPosition.
- Parameters:
@Nonnull final MotionControllermotionControllerfinal booleanapproximate@Nonnull final ComponentAccessorcomponentAccessor