Search Unity

  1. Check out the Unite LA keynote for updates on the Visual Effect Editor, the FPS Sample, ECS, Unity for Film and more! Watch it now!
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  4. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  5. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

How to make automatic swing (Hinge joint 2D?)

Discussion in 'Physics' started by unity_jBOSmd1e1IroQw, Nov 6, 2018.

  1. unity_jBOSmd1e1IroQw

    unity_jBOSmd1e1IroQw

    Joined:
    Sep 30, 2018
    Posts:
    41
    I'm trying to make a simple automatic swing that swings to left and right without losing speed. I am able to create object that rotates full 360 degrees using hingejoint2d and using it's motor, but I don't know how I would create a swing (I tried playing with angle limits but with no luck). The closest I was is to use motor and then disable it, which causes the object to swing from one side to other, but it loses speed over time.
     
  2. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    1,937
    Reduce / remove drag of rigid body.