Results 1 to 9 of 9

Thread: [Theory + VB] Turntable Physics

Threaded View

  1. #1

    Thread Starter
    Elite Hacker Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,349

    [Theory + VB] Turntable Physics

    Might need some help with the physics. I might be wrong with the formulas I used. So far it does exactly what my turntables do in real life. If I'm wrong, let me know. The formulas are located in my Game_Loop sub where it says this:

    VB Code:
    1. If Turntable_State > Turntable_On Then
    2.        
    3.             If Turntable_State = Turntable_On + Turntable_Start Then
    4.        
    5.                 I = I + (VINYL_MASS * VINYL_RADIUS ^ 2)
    6.            
    7.                 If I >= Pitch Then I = Pitch
    8.            
    9.             ElseIf Turntable_State = Turntable_On + Turntable_Stop Then
    10.        
    11.                 I = I - (VINYL_MASS * VINYL_RADIUS ^ 2)
    12.                
    13.                 If I <= 0 Then I = 0
    14.                
    15.             End If
    16.            
    17.         Else
    18.            
    19.             If I > 0 Then I = I - VINYL_DIAMETER
    20.            
    21.             If I <= 0 Then I = 0
    22.            
    23.         End If

    And in this line is where I add the time based rotation:

    VB Code:
    1. Rotation = Rotation + (Time * I)

    Here's the project. If there are any problems with the physics, please let me know. Here are the controls:

    Space: Turns the Power On

    Enter: Turns the Power Off

    A: Starts the Turntable when the Power is On
    Z: Stops the Turntable when the Power is On

    Numpad: Controls Camera

    Up/Down Arrow Keys: Controls RPM
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width