Search Unity

Rotational and linear velocities - conveyor belt system

Discussion in 'Physics' started by SyntaxTerror, Apr 15, 2021.

  1. SyntaxTerror

    SyntaxTerror

    Joined:
    Jul 14, 2012
    Posts:
    32
    I've created a simple conveyor belt system. The belt contains two cogs, one at each end, and a couple of simple elongated cubes to represent the belt itself. The problem I have is matching the speed of objects dropped onto the belt with the rotational speed of the cogs.

    How can I convert the rotational movement to linear velocity? I've found code to calculate the RPM but I don't know how to find out the velocity of the outside edge of the cog.

    Edit: Nevermind, I was able to figure it out for my setup.


    Code (CSharp):
    1. var _distance = Vector3.Distance(beltPivot.transform.position, transform.position);
    2.  
    3. // Get the RPM - in another function, so not included
    4.  
    5. var _circumference = _distance * (2 * Mathf.PI);
    6. var _linearVelocity = _rpm * _circumference;
     
    Last edited: Apr 15, 2021