Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Why do physics joints no move when I run into them?

Discussion in 'Physics' started by Lethn, Jan 2, 2018.

  1. Lethn

    Lethn

    Joined:
    May 18, 2015
    Posts:
    1,583
    I'm experimenting with physics joints right now, it's such a huge subject with loads of features you can add, I got an automatic weapon firing and I'm even using addforce on it now to make this basic spring joint I have swing about. However one thing I've noticed is that for whatever reason when I run into the spring joint as a player the spring joint barely moves, can anyone explain why this is?

    For those wondering what my setup is, I've got a classic 'ball and chain' scenario, but I haven't done anything complicated with the models yet. I've got a sphere to be the fixed joint and then the ball is just a spring joint cube, works fine on default settings but I'd like to understand all of this better.

    The reason I'm a bit baffled by this is because I can knock over all the other rigidbodies just by walking into them fine and sometimes the cube that is attached to the sphere does move but only barely.
     
  2. KeithKong

    KeithKong

    Joined:
    May 31, 2015
    Posts:
    73
    A spring joint is trying to return to the origin position. So if you hit a spring joint that is resting at its origin point the spring force will generally be in the opposite direction of your characters movement. The stronger the spring the faster it will slow the player and resist movement.
     
  3. Lethn

    Lethn

    Joined:
    May 18, 2015
    Posts:
    1,583
    So does that mean I'm using the wrong type of joint for the effect that I'm looking for? I noticed that I could move the spring joint if I shot it a bit to get it moving beforehand.
     
  4. KeithKong

    KeithKong

    Joined:
    May 31, 2015
    Posts:
    73
    You haven't really articulated the behavior you're going for or even the setup. Is the character the sphere-square connected spring object or is the character running into this thing? What's "supposed" to happen when the character runs into this thing (or what is this spring joint character running into)?

    It seems like you need to research into joints a lot more. Learning the physical concepts behind them couldn't hurt either. Most people seem to just play with mass/spring/bounce/limit values until they get what they want but I prefer working in physical terms where you can calculate intelligent values and adjust from there.