Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PredictFuturePosition now checks for Position #56

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

michaelcurtiss
Copy link

@michaelcurtiss michaelcurtiss commented Jan 19, 2017

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...

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). So, instead of a movement vector which went from detectableObject.Position to a future detectableObject.Position, it was going from dectectableObect.Position to a future transform.Position.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant