Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Does anyone know how to make a Mecanum wheel in unity 3d?

Discussion in 'Physics' started by Hatemsla, Nov 1, 2022.

  1. Hatemsla

    Hatemsla

    Joined:
    Oct 17, 2021
    Posts:
    61
    I'm trying to implement robot control using ilona wheels. The problem is that I don't quite understand how to implement small wheels on large ones, do you really just need to stick a wheel collider on each small one? Then how will this affect performance? If there can be 12 small wheels on one wheel, and this is 48 Wheel colliders on one car! Moreover, large wheels should also be a wheel collider or have a component with which they could be rotated. I haven't found any implementation of this solution yet
     
  2. arkano22

    arkano22

    Joined:
    Sep 20, 2012
    Posts:
    1,662
    What's an "ilona" wheel? Googled this term found found absolutely nothing relevant.

    Wow, wheels on wheels! that's some crazy stuff. It would help if you could explain what you're trying to do in greater detail.
     
  3. karliss_coldwild

    karliss_coldwild

    Joined:
    Oct 1, 2020
    Posts:
    530
  4. Neto_Kokku

    Neto_Kokku

    Joined:
    Feb 15, 2018
    Posts:
    1,751
    I doubt the wheel collider will behave well configured like this. I would think of ways of faking it instead.
     
  5. yant

    yant

    Unity Technologies

    Joined:
    Jul 24, 2013
    Posts:
    577
    Hey @Hatemsla

    I'm glad you asked, since we're working on figuring the standard recommendations and approaches for these kinds of machines internally.

    So far, we'd really recommend using the WheelCollider component exclusively for games applications with fast moving cars (this is where you can capitalise on the Paceijka-inspired tyre friction model the most). By design, you can not have recursive wheels with the WheelCollider component, so Mecanum style barrels on wheels won't be directly possible with it.

    For robotics applications, we suggest using ArticulationBodies instead and rely on the default static/dynamic friction model that would be fairly accurate at comparatively low speeds (for until you don't simulate forklift racing of some sort J). Each body part, and each wheel, and each barrel on the wheels will become an ArticulationBody. Currently, you can only have up to 64 ArticulationBodies in a given articulation, but 2023.1 will feature a bump to 256, as well, as, most likely, 2022.2 later this year (as a back-ported highly needed change). That will be enough to simulate the forklift from above, and many others too.

    Let me know if that helps.

    Anthony