Search Unity

Joint to simulate pendulum (along multiple axis)

Discussion in 'Physics' started by Zettman, Dec 6, 2019.

  1. Zettman

    Zettman

    Joined:
    Dec 31, 2017
    Posts:
    1
    Hi community,
    I am trying to simulate a pendulum effect, but not the common type where a pendulum constantly sways along a single axis. I want to simulate it more like a wrecking ball, but not with a rope consisting of multiple joints (comes with limitations, especially for heavy weight ratios). The rope is just for visuals, not for physics.
    So far, I've used a joint to connect the bottom part (wrecking ball) to the top. Now, if I move the top part, the bottom part should move accordingly, and since the distance is fixed, a pendulum movement should be performed. Particularly, if the top part stops moving, the pendulum effect should appear. So far, this works only for a movement along the z-axis, but not along the x-axis. For the latter, the movement seems to be some kind of spring. As far as I understood, multiple rotational axis should be possible, at least for the configurable joint. I've tried to change the Axis, Swing Axis, and spring settings in the joint configuration, but without success.
    Are the joints limited to swing only along a single axis, or do I need to configure them correctly? If so, can you please show me the variables to fix?

    The gif shows the effect of using the configurable joint in default.
    pendulum.gif

    Thanks for your help :)
     
  2. batvink

    batvink

    Joined:
    Sep 26, 2019
    Posts:
    61
    @Zettman did you solve this problem. I am looking for something similar, where I want to "drag" an object like it is attached by a rope.