PredictFuturePosition now checks for Position #56
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.
Both the PredictFuturePosition and PredictFutureDesiredPosition should check for the Position property instead of the Transform.position property, so as to account for the DetectableObject's Center offset.
The biggest bug I've found regarding the previous implementation is in regards to the SteerForSphericalObstacles script, which uses the return value of PredictFutureDesiredPosition() to construct a movement vector to work with. This movement vector will be inaccurate since in the steering behaviors I've seen, the DesiredVelocity is being applied with the vehicle's Center property in mind (e.g. SteerForPathSimplified). That is, DesiredVelocity goes from detectableObject.Position to a future detectableObject.Position, but the constructed movement vectory in SteerForSphericalObstacles was going from dectectableObect.Position to a future transform.Position, an inaccurate move vector resulting in inaccurate collision checks.
However, I haven't fully explored all calls to the PredictFuturePosition() functions, so it might create problems somewhere...