Search Unity

Problem with speed and angular speed : bolt and nut system

Discussion in 'Physics' started by Victoireb, Sep 14, 2017.

  1. Victoireb

    Victoireb

    Joined:
    Sep 14, 2017
    Posts:
    2
    I have design a bolt (M16 and pitch = 2 mm) and a nut and I want the bolt to screw in the nut. The problem is that I don't know what are the units of speed and angular speed. I saw that it could be m/s and rad/s but it doesn't work because when I use the formula : angular speed (RPM) = feed rate (mm/min) / pitch (mm), with a feed rate of 1 (unity unit) I get an angular speed of 3142 rad/s, and it's impossible..
    You will find in attachment a part of the code.

    Thank you for your answers

    Victoire
     

    Attached Files:

  2. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,411
  3. Victoireb

    Victoireb

    Joined:
    Sep 14, 2017
    Posts:
    2
    Sorry but it changes nothing..
    Thank you
     
  4. Plystire

    Plystire

    Joined:
    Oct 30, 2016
    Posts:
    142
    mgear, are you referring to the Transform.Translate command? It's suppose to be that way.

    Victoireb, can you elaborate on your issue a bit more? What is the bolt and nut currently doing? How is it different from what you want it to do? Usually if you can't calculate the values you're looking for you wind up playing a game of "hot and cold" while you adjust until the value is what you want. I'd suggest starting with a very low value for turnSpeed so you can see it turning, and then adjust speed until the threads no longer appear to move, like a real bolt that's threading. With those values in hand, you now have a ratio and you can just scale.

    If you want to do the hard calculations, remember that unity's default spacial unit is understood to be meters. You will probably want to make sure your model is scaled to suit. Also the Transform.Rotate command uses Degrees instead of Radians, so make sure you're converting to that.
     
  5. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Use forum code tags next time. Screenshots of code are simply not usable, and rather silly.