Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

Question Moving along an object with a joint

Discussion in 'Physics' started by Kostyan_Sigaev, Dec 7, 2022.

  1. Kostyan_Sigaev

    Kostyan_Sigaev

    Joined:
    Jan 10, 2022
    Posts:
    12
    I am making a 3D game, in which an object moves freely in space, but another object is attached to this object with the help of joit, which can rotate in some planes (not hard binding). This second object should move along the third - static object, thereby preventing the first object from flying too far. I wanted to snap the second object to the third via a joint, but either way I get either a hard snap or a rotation around one point of the third object. Is there a way to properly set up a joint? Or will you have to write a script that binds this object?

    P.S. Sorry my bad english, i from Ukraine
     
  2. karliss_coldwild

    karliss_coldwild

    Joined:
    Oct 1, 2020
    Posts:
    613
    Can you try to explain this part again? I am not sure what you meant by snapping. I have no idea what exactly you did and what joint you used, so it's hard to tell whether you just didn't do it correctly or tried to do something impossible.

    Maybe try making a drawing illustrating the whole setup and in which directions you want each to move and rotate. Or even better two drawings one for what you want and one for what you actually get.
     
  3. Kostyan_Sigaev

    Kostyan_Sigaev

    Joined:
    Jan 10, 2022
    Posts:
    12
    The most successful comparison would be a trolleybus that is connected to a wire. But with any adjustment of the joint, I can't move along the "wire". As a comparison, sometimes a dog tied to a chain is tied not to a hook, but to a long rod in order to move around the yard and not go beyond its territory. This is just a comparison.
     
  4. Kostyan_Sigaev

    Kostyan_Sigaev

    Joined:
    Jan 10, 2022
    Posts:
    12