Search Unity

Accessing "FixedJoint" through script?

Discussion in 'Scripting' started by bigkahuna, Oct 1, 2007.

  1. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    Search as I might, I can't find any way to access a fixed joint through script? Is there a way?
     
  2. StarManta

    StarManta

    Joined:
    Oct 23, 2006
    Posts:
    8,775
    That's wierd... I was going to say GetComponent(FixedJoint), but that class isn't listed in the documentation...


    That said, Fixed Joints are crap anyway. They vibrate and shake and do strange things, especially when you have a lot of them. Use Hinge Joints instead and set their limits to be very restrictive.
     
  3. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    Looks like the same question has been asked a couple times over the last year or so, I wondered if it had been added, but apparently not.

    That's exactly what I went ahead and did. It's actually more "realistic" looking and seems to work just fine...