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

Using Joints to move a sword to certain points around a Character

Discussion in 'Physics' started by Lamprey, Mar 2, 2016.

  1. Lamprey

    Lamprey

    Joined:
    May 26, 2015
    Posts:
    36
    I'm trying to achieve a fluid, physics, pseudo animation that makes a sword swing from point to point in 2D. For the most part, I've gotten it to work. The only problem is that the DistanceJoint2D's manage to get themselves stuck in a certain place and don't return to the specified location. The way I managed this was through Invoke and setting specific distances for each phase of the animations. This created a fluid animation that had physics and realism. If someone could help me understand distance joints or maybe even help me understand whether or not this is viable, that would be appreciated. Here are some pictures: Untitled2.png
     
  2. Lamprey

    Lamprey

    Joined:
    May 26, 2015
    Posts:
    36
    Working. Proof of concept: