Skip to content

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