Trying to replicate (albeit unsuccessfully) the phenomenon of boids using Ursina in a naive manner

Trying to replicate (albeit unsuccessfully) the phenomenon of boids using Ursina in a naive manner.

Please install the Ursina module before running the code. More about that here.

This is an attempt to copy the simulation created by Ben Eater using Vanilla JavaScript

Link to his code

The premise for this simulation is the following (Please refer the above code too, where it has been explained in a much better way than I am going to here):

  1. Each boid has to remain within some boundary. If it goes beyond a certain distance, the boid has to “turn” back.
  2. There must be a speed limit, and if the boids reach this limit, then their speed must not increase beyond that.
  3. If a boid

     

     

     

    To finish reading, please visit source site