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

flocking issues - Screen boundry #2

Open
phpchess opened this issue Jun 30, 2016 · 1 comment
Open

flocking issues - Screen boundry #2

phpchess opened this issue Jun 30, 2016 · 1 comment

Comments

@phpchess
Copy link

MissingComponentException: There is no 'Rigidbody' attached to the "ScreenBoundary" game object, but a script is trying to access it.
You probably need to add a Rigidbody to the game object "ScreenBoundary". Or your script needs to check if the component is attached before using it.
UnityEngine.Rigidbody.get_position () (at C:/buildslave/unity/build/artifacts/generated/common/modules/Physics/DynamicsBindings.gen.cs:1536)
Cohesion.getSteering (ICollection`1 targets) (at Assets/unity-movement-ai/Scripts/Movement/Cohesion.cs:28)
FlockingUnit.Update () (at Assets/unity-movement-ai/Scripts/FlockingUnit.cs:35)

No such issue exists for other Example scenes. I am using unity 5.3.4

@sturdyspoon
Copy link
Owner

Are you using ScreenBoundary inside of your own project? I think the master branch version of unity-movement-ai relies on Physics project settings to make sure the screen boundary is not sensed.

In the dev branch (which is vastly different from the master branch) I have made my code just ignore any collider without a MovementAIRigidbody (which is basically just a wrapper class for the library to be able to work with Rigidbody2Dand Unity's 3D Rigidbody).

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

No branches or pull requests

2 participants