Search Unity

Hay Bales, stabbing and moving...

Discussion in 'Physics' started by mbowen89, Apr 10, 2018.

  1. mbowen89

    mbowen89

    Joined:
    Jan 21, 2013
    Posts:
    635
    Does anyone have a genius idea on how you could stab a hay bale with a hay spear and have it be moved around? Right now I have colliders creating an outside boundary, but you are stabbing in the middle. So I have created a sort of grid of colliders that tries to let you slide the spears in but then when you lift will still catch. It's very finicky though.

    Any ideas how you simulate being able to stab in anywhere on the bale ok, but the bale isn't going to move vertically on the spear, it has all the material pressed on to the spears circumference, not being stabbed. I mean it's like stabbing a tomato with a knife.

     
  2. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    1,624
    I can think on a fixed joint for keeping the bale in the correct position. You may modify the joint's strength and target position dynamically based on the relative positions of the vehicle and the bale.
     
  3. mbowen89

    mbowen89

    Joined:
    Jan 21, 2013
    Posts:
    635
    Yeah, that is kind of what I was thinking, creating a fixed joint based on certain proximity to the spear and then modify it's strength. Will take lots of testing and coding to try and see if it can be done.
     
unityunity