Giter Site home page Giter Site logo

Comments (9)

davechurchill avatar davechurchill commented on July 4, 2024

Polygonal bodies completely change the entire physics system to be really complex and slow , which is why we wrote cwaggle in the first place! Arbitrary polygon intersections are very expensive computations. This will be a very very long term implementation and I don't expect I'll get to it any time soon

from cwaggle.

davechurchill avatar davechurchill commented on July 4, 2024

You can 'get around' this by hacking together a system that just changes the position of some of your entities with LineBody(s) to follow their position as they move

from cwaggle.

avardy avatar avardy commented on July 4, 2024

On polygonal bodies: okay, fair point.
On the LineBody idea: not 100% sure what you mean. Something like creating a temporary LineBody (s) at the robot's current position, then immediately removing them?
Other idea: multiple CircleBody components per robot, allowing you to approximate other shapes. Is that a bit more doable?

from cwaggle.

davechurchill avatar davechurchill commented on July 4, 2024

The problem is the 'linking' of the multiple bodies together, which completely changes how the physics engine works. Can you give a concrete example of something you need to do?

from cwaggle.

avardy avatar avardy commented on July 4, 2024

I want to simulate a non-circular robot with a wedge-shaped plow at the front.

from cwaggle.

davechurchill avatar davechurchill commented on July 4, 2024

That's going to take more work to implement than writing the entire simulator has so far. You can simulate a wedge right now with two linebody entities, if you manually update the position of the lines. However they can currently only interact with things that have circlebodies

from cwaggle.

avardy avatar avardy commented on July 4, 2024

Okay, I'll give the linebody wedge a go. It means I will get more realistic collisions between robots and pucks. Collisions between robots will be slightly less realistic (both just circles), but that's okay.

from cwaggle.

avardy avatar avardy commented on July 4, 2024

I have a version of the linebody wedge working..
image
Currently however I get pucks trapped between the two linebodys and the circlebody of the robot. But I have an idea to fix this.

from cwaggle.

davechurchill avatar davechurchill commented on July 4, 2024

Nice!

from cwaggle.

Related Issues (2)

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.