Search Unity

How to make a custom wheel collider

Discussion in 'Scripting' started by LS16BMX, Dec 13, 2011.

Thread Status:
Not open for further replies.
  1. LS16BMX

    LS16BMX

    Joined:
    Nov 11, 2011
    Posts:
    94
    This is something i'm trying to get to grips with although at the moment I have no real reference on how to go about it.
    I pretty much need the standard unity wheel collider however instead of the usual raycast replaced by a sphere cast in its place.
    This will enable full surface collision with the wheel instead of the normal issues facing standard wheel colliders not working for wheelies or colliding properly with the environment.
    Question is do I have to re write an entire new wheel collider system or is it possible to modify the existing system making use of the Physics.SphereCast function ?
     
    Deleted User likes this.
  2. LS16BMX

    LS16BMX

    Joined:
    Nov 11, 2011
    Posts:
    94
    Ok so i've been looking at the wheel collider source from Nic Tolentino :
    http://www.unifycommunity.com/wiki/index.php?title=WheelColliderSource
    http://forum.unity3d.com/threads/64494-Wheel-Collider-Source-Project

    I'm looking at the code and I find where the raycast elements are and how the function.

    Also here is a good explanation of whats wrong with the current unity wheel collider from Petey :
    http://forum.unity3d.com/threads/90765-Trouble-with-WheelCollider-What-options-have-I-got.

    NewLife's UnityCar has I believe implemented sphere casting to solve the problem so this is the route i'm going down as it makes the most sense at the moment.
     
    Last edited: Dec 15, 2011
    Deleted User likes this.
  3. LS16BMX

    LS16BMX

    Joined:
    Nov 11, 2011
    Posts:
    94
    anybody interested in making motorbikes or 2 wheeled vehicles in general would benefit from this work, please show your interest at least !
     
    simoncura likes this.
  4. LS16BMX

    LS16BMX

    Joined:
    Nov 11, 2011
    Posts:
    94
    Help !
     
  5. attacker5

    attacker5

    Joined:
    Dec 30, 2011
    Posts:
    2
    Hey,
    This looks very interesting, I am curious and In need of a Wheel collider myself, If you could share more info about this it would be really great.
    I'm new to Unity and would love to know how to make a wheel collider from scratch as well, since the stock one seems very limiting.
    Thank you.
    Attacker
     
  6. LS16BMX

    LS16BMX

    Joined:
    Nov 11, 2011
    Posts:
    94
    Hi Attacker
    Are you looking into bike wheel colliders in particular or just in general ?
     
  7. attacker5

    attacker5

    Joined:
    Dec 30, 2011
    Posts:
    2
    Just general, I am actually setting up, or trying to, set up an ATV setup, with the front A-Arms and Swingarm at the back, stock wheel colliders just dont seem to cut it. Would be interesting to know what you have found out so far.
     
  8. LS16BMX

    LS16BMX

    Joined:
    Nov 11, 2011
    Posts:
    94
    Well you'll need to be able wheelie which is where the standard wheel collider falls down for anything greater that a small power wheelie.
    I've found you can use sphere colliders and joints but its hard to get proper friction like what the wheel collider does very well. People have had decent succes with sphere colliders and also with making custom wheel colliders but any real detailed information is very hard to come by. I've been documenting my experiences here - http://www.youtube.com/playlist?list=PLA9BBCE7167D56D5E&feature=plcp
    I'm getting closer all the time, i've got some good contacts now but waiting to hear back about some better solutions. I'll post anything I find out and you can search my posts to see what i've found out so far (its all I talk about).
    Many people aren't prepared to share their learning thought and it's not really something i've encountered before. I can see if somebody has invested money in a solution and is worried that the competition will get one over on them but its not how i think.
    Anyhows watch this space I suppose and let me know if you uncover anything of interest, Unity is an awesome tool and its more than up to the job with a little fettling :O)
     
  9. TheVirtualWild

    TheVirtualWild

    Joined:
    Oct 1, 2013
    Posts:
    1
    I now this is an old thread but was a solution ever worked out?
     
  10. KurtisA

    KurtisA

    Joined:
    Feb 10, 2019
    Posts:
    1
    this wheel controller business is top secret stuff :p
     
  11. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,452
    Please don't necro nearly 11 year old threads like this.
     
Thread Status:
Not open for further replies.