Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

How to create a modular wheel (like a Lego block)

Discussion in 'Physics' started by juliocdep, Sep 18, 2015.

  1. juliocdep

    juliocdep

    Joined:
    Sep 30, 2010
    Posts:
    30
    Hello,

    I'm making a race game where you can build your car with blocks (like Lego). The physics is similar to the one of the Besiege, where each block has its own rigidbody and they are connected together with fixed/hinge/configurable joints. My doubt is how to make the wheels. In this situations which is the best practice. Use an hinge joint with a motor or a wheel collider?

    Actually I using the hinge joint for the prototype it is very straight forward, but seems incorrect. But for wheel collider, how can I configure it? Considering that the car doesn't have a main body with a main mass. And another feature that the wheel need has is the possibilty to connect other blocks to it.


    Best regards...
     
  2. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    1,827
    You could have a "block" consisting of a rigidbody and a single wheel. That would be the "wheel block". You would attach it to other parts in the same way as the other blocks.
     
unityunity