Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Custom wheel collider

Discussion in 'Physics' started by radialxawn, Jul 7, 2019.

  1. radialxawn

    radialxawn

    Joined:
    May 13, 2019
    Posts:
    29
    Hi, i'm making a custom wheel collider using multi raycast but now i got into a problem when the wheel in between two obstacles it will act like this Mesh.gif . I need some help.
     
  2. SparrowGS

    SparrowGS

    Joined:
    Apr 6, 2017
    Posts:
    2,536
    Lock you diff and accelerate.

    ---
    How are we suppouse to help exactly?
     
  3. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    2,497
    Indeed, as for what I see in that gif, it looks like the expected behavior for that method in that situation.
     
  4. radialxawn

    radialxawn

    Joined:
    May 13, 2019
    Posts:
    29
    In that situation (the car is standing, no action is applied), the suspension force direction is the red vector so it will cause the problem. Any idea how to calculate the average contact point or the suspension force direction, i'm stuck there for month and really need help.
     
  5. KouroshX98

    KouroshX98

    Joined:
    Feb 8, 2018
    Posts:
    24
    I think you should apply the suspension force only upwards
     
  6. radialxawn

    radialxawn

    Joined:
    May 13, 2019
    Posts:
    29
    Well, thank. I tested and it work but it will cause another problem when your front and rear wheel are in different height, the upwards force will cause the car to move.
     
  7. KouroshX98

    KouroshX98

    Joined:
    Feb 8, 2018
    Posts:
    24
    I think then you should apply some force forward to cancel out the components.or you could apply some break torque to rear wheels to keep it from moving.
     
  8. radialxawn

    radialxawn

    Joined:
    May 13, 2019
    Posts:
    29
    Thank, i need to learn more to make my own car physics.