#Boids
1 messages · Page 1 of 1 (latest)
you need to assign the prefab
hi
Does it work if you have assigned the prefab
wym by assign the prefab
dragging and dropping the prefab asset onto the field in the Flock Script component that I screenshotted
O_O my bad
yess
it workedd
thank you so much man
👍 you should remove all the prefab stuff from boidscript, then you're good
sorry if i was a nuisance
I'm confused. He was supposed to instantiate the component?
yeah will do
sitting for 24+ hrs trying to solve this
If you reference a component on a prefab and instance it it instances the whole prefab and returns you the instanced component
aah, very handy, thank you
hi
i implemented alignment
and i tried to increase the number of boids
but it limits to 101 for some reason
plus it gives me an index out of bounds error
Post the actual error. it has information
ill post iit in a bit im out rn
i finished my project and it works
but
it runs very bad
when i enable all three cohesion, alignment and separation
this is the link to the repo
Perhaps someone else have some suggestions for optimization.
You could try setting the Application.targetFrameRate to something more managable.
By default, I believe it is 300 or something.
See if 64 or 100 FPS works any better
ill try
i noticed it works fine when 2 forces are acting on all 100 objects
but as soon as i enable the third one the frame rate goes to single digits
like, it dips from 50-60 to 5-7 fps
ill try redoing the whole logic
is there some way to get a number of objects around u that are in a certain radius?