#Boids

1 messages · Page 1 of 1 (latest)

quiet roost
#

Can you screenshot your setup and the output of the console?

regal bone
#

yes

quiet roost
#

you need to assign the prefab

regal bone
eternal olive
#

hi

regal bone
#

latest updates

quiet roost
regal bone
#

nope

#

i tried assigning the prefab by drag n drop

regal bone
quiet roost
#

dragging and dropping the prefab asset onto the field in the Flock Script component that I screenshotted

regal bone
#

yess

#

it workedd

#

thank you so much man

quiet roost
#

👍 you should remove all the prefab stuff from boidscript, then you're good

regal bone
#

sorry if i was a nuisance

sacred reef
#

I'm confused. He was supposed to instantiate the component?

regal bone
#

sitting for 24+ hrs trying to solve this

quiet roost
regal bone
#

i would love to show you all the end result

regal bone
#

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

sacred reef
regal bone
#

ill post iit in a bit im out rn

regal bone
#

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

regal bone
sacred reef
#

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

regal bone
#

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?