Search Unity

Question about wheel colliders

Discussion in 'Editor & General Support' started by SteelX, Oct 31, 2009.

  1. SteelX

    SteelX

    Joined:
    Apr 14, 2009
    Posts:
    13
    I wondering if wheel collider needs motor and other stuff to turn, i did this, created 2 boxes as car body and then added 4 cylinders as body children. I can't see suspension working and those "wheels" don't turn. is necessary to add something extra?
     
  2. andeeeee

    andeeeee

    Joined:
    Jul 19, 2005
    Posts:
    8,768
    The WheelCollider is purely a physics component. It has properties like rpm and center that describe aspects of the wheel's behaviour, but it doesn't move the wheel graphics itself. You should make separate objects for the graphical wheels and move them from a script according to the WheelCollider properties. But don't rotate the WheelCollider objects themselves.
     
  3. SteelX

    SteelX

    Joined:
    Apr 14, 2009
    Posts:
    13
    hi andeeee, indeed i know WheelColliders are purely physics component. But i thought i can add some wheel Colliders and thus when i drop the car from a specific height the car will bounce due suspension , also if i hit with some other object perhaps with a misile or another car the wheels could rotate because i'm applying a force.

    well, i'll add a script and see if behave good. thx a lot