Code Monkey home page Code Monkey logo

Comments (3)

ricardojmendez avatar ricardojmendez commented on May 22, 2024

Hi Mike,

Actually, this is likely because of how AutonomousVehicle currently interprets the forward vector (which is mentioned on the same article). If you attempt to run the boid example, they'll look as if they're having a seizure. I'll need to figure out what to do with that - it's possible that I may end up keeping AutonomousVehicle the way it was and fork the current behavior into a different class.

For now, if you're running into one of those cases, you may need to stick with the master branch.

from unitysteer.

ricardojmendez avatar ricardojmendez commented on May 22, 2024

Let me elaborate a bit more on what the issue is here, from the point of view of how things are on master. It's not just an issue of tweaking - this stems from the completely different way in which the development / master versions perceive velocity.

For master (and the working boids) velocity is an effect of its forward vector and speed. When it decides to move,it moves forward and can change direction by gradually moving its forward vector to be aligned with the new desired velocity. This means that they'll tend to move forward before turning around, like a car or a bird in flight would do.

For development (and the dubstep-dancing boids) velocity is the actual movement we're executing. Instead of tending to move forward, the agents are able to move in a direction while retaining a different forward vector. The jittery that you're seeing is the effect of the boids not gliding, but instead trying to sides-step each other. The new behavior just doesn't lend itself for boids.

If you want to retain the more vehicle-like behavior but take advantage of other improvements from the development branch, you could look into merging both AutonomousVehicle classes, or reverting the relevant commit, although I doubt such a change would apply cleanly:

65d15d9

That commit also explains the changes, so it might be good reading if you're considering adjusting the code.

from unitysteer.

miketucker avatar miketucker commented on May 22, 2024

hey Ricardo,

Thanks so much for your time. I've worked through it at this point. A while back i wrote you because the master branch wouldn't compile on iOS so i switched to the dev branch. It compiled but broke the boids :)

So today after writing you, I took the master branch, removed the C5 dependency and that fixed the iOS compile.
Really amazing job on this library, hope I can return the favor sometime. Btw I've been keeping an eye on your tile-based game, looking forward to playing that.

from unitysteer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.