Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Contains
FleeComponent
toFleeingComponent
Objective
This is a continuation of PR #16 on the subject of mitigating the synchronized stray behavior. This PR fixes the "general orientation"bug inserted by PR #16 and mitigates the visual flipping effect of creatures. The latter is caused by a orientation change derived from the movement to a neighbor block, which causes the impression that the creature just flipped its original orientation to a new one. This effect is mitigated by forcing a higher minimal number of neighbor interactions when setting the target destination for the creature, which causes it to statistically choose a farther destination, and therefore making a perceptible movement when changing its original orientation. The mitigation is statistical since the number of interactions over an initial list of neighbor blocks is based on a random function, and there's a change that after a number of interactions the target destination is still set to a neighbor block.
Changes
MoveTo
actionSetTargetToNearbyBlockNode.findRandomNearbyBlock()
FleeComponent
toFleeingComponent
and all related references