Vehicle Wrapper -- Blender 3D Game Engine


 
pageok

 
5.  Suspension.py ---  Suspension Damping  (Line Numbers:  82 - 94)

Note:
Suspension damping can be changed at any time while the game is running.  

Note:
0 = first tire added by AddWheel in CarSetup.py
1 = second tire added by AddWheel in CarSetup.py
2 = third tire added by AddWheel in CarSetup.py
3 = fourth tire added by AddWheel in CarSetup.py

##########################################################

# set suspension damping
def Suspension_Damping(vehicleID):
   
    damp_0 = 5.0     # front driver's tire
    damp_1 = 5.0     # front passenger's tire
    damp_2 = 5.0     # rear driver's tire
    damp_3 = 5.0     # rear passenger's tire
   
    vehicleID.setSuspensionDamping(damp_0, 0)  # front driver's tire
    vehicleID.setSuspensionDamping(damp_1, 1)  # front passenger's tire
    vehicleID.setSuspensionDamping(damp_2, 2)  # rear driver's tire
    vehicleID.setSuspensionDamping(damp_3, 3)  # rear passenger's tire

 
       
6.  Suspension.py ---  Suspension Stiffness  (Line Numbers:  98 - 110)

Note:
Suspension stiffness can be changed at any time while the game is running.  

Note:
0 = first tire added by AddWheel in CarSetup.py
1 = second tire added by AddWheel in CarSetup.py
2 = third tire added by AddWheel in CarSetup.py
3 = fourth tire added by AddWheel in CarSetup.py

##########################################################

# set suspension stiffness
def Suspension_Stiffness(vehicleID):
   
    stiffness_0 = 12.5     # front driver's tire
    stiffness_1 = 12.5     # front passenger's tire
    stiffness_2 = 12.5     # rear driver's tire
    stiffness_3 = 12.5     # rear passenger's tire
   
    vehicleID.setSuspensionStiffness(stiffness_0, 0)  # front driver's tire
    vehicleID.setSuspensionStiffness(stiffness_1, 1)  # front passenger's tire
    vehicleID.setSuspensionStiffness(stiffness_2, 2)  # rear driver's tire
    vehicleID.setSuspensionStiffness(stiffness_3, 3)  # rear passenger's tire

 
  
7.  Suspension.py ---  Roll Influence  (Line Numbers:  113 - 125)

Note:
Roll influence can be changed at any time while the game is running.  

Note:
0 = first tire added by AddWheel in CarSetup.py
1 = second tire added by AddWheel in CarSetup.py
2 = third tire added by AddWheel in CarSetup.py
3 = fourth tire added by AddWheel in CarSetup.py

##########################################################

# set roll influence
def Roll_Influence(vehicleID):

    roll_0 = 0.06     # front driver's tire
    roll_1 = 0.06     # front passenger's tire
    roll_2 = 0.06     # rear driver's tire
    roll_3 = 0.06     # rear passenger's tire

    vehicleID.setRollInfluence( roll_0, 0)  # front driver's tire
    vehicleID.setRollInfluence( roll_1, 1)  # front passenger's tire
    vehicleID.setRollInfluence( roll_2, 2)  # rear driver's tire
    vehicleID.setRollInfluence( roll_3, 3)  # rear passenger's tire

 

 
pageok