Vehicle Wrapper -- Blender 3D Game Engine



pageok

  
4.  CarSetup.py ---  Tire radius  (Line Numbers:  119 - 130)

Note:
The radius of your tires in Blender units.  The radius of my tires is 0.75 blender units.


##########################   Tire radius

def Tire_Radius():

    # tire radius
    tire_0_Radius = 0.75   # front driver's tire
    tire_1_Radius = 0.75   # front passenger's tire
    tire_2_Radius = 0.75   # rear driver's tire
    tire_3_Radius = 0.75   # rear passenger's tire
   
    return (tire_0_Radius, tire_1_Radius, tire_2_Radius, tire_3_Radius)

 
  
5.  CarSetup.py ---  Suspension Height  (Line Numbers:  131 - 142)

Note:
The height of your suspension in Blender units.  The height I want my suspension to be is 0.2 blender units.


##########################   Tire suspension

def Tire_Suspension():

    # tire suspension height
    tire_0_suspensionHeight = 0.2   # front driver's tire
    tire_1_suspensionHeight = 0.2   # front passenger's tire
    tire_2_suspensionHeight = 0.2   # rear driver's tire
    tire_3_suspensionHeight = 0.2   # rear passenger's tire
   
    return (tire_0_suspensionHeight, tire_1_suspensionHeight, tire_2_suspensionHeight, tire_3_suspensionHeight)

 
  
6.  Car Setup:  Tire Suspension Angle  (Line Numbers:  143 - 154)

Note:
The suspension angle is a 3D vector.  
Using the -Z axis is recommended
[ 0.0, 0.0, -1.0] is the -Z axis

##########################   Tire suspension angle

def Tire_SuspensionAngle():

    # suspension angle from car object center
    tire_0_suspensionAngle = [ 0.0, 0.0, -1.0]   # front driver's tire
    tire_1_suspensionAngle = [ 0.0, 0.0, -1.0]   # front passenger's tire
    tire_2_suspensionAngle = [ 0.0, 0.0, -1.0]   # rear driver's tire
    tire_3_suspensionAngle = [ 0.0, 0.0, -1.0]   # rear passenger's tire
    
    return (tire_0_suspensionAngle, tire_1_suspensionAngle, tire_2_suspensionAngle, tire_3_suspensionAngle)

  
7.  Car Setup:  Tire Axis  (Line Numbers:  155 - 167)

Note:
This is the axis of the tire that is attached to the car 'frame'
The tire axis is a 3D vector.  
Using the same X axis for all tires is recommended.
[ -1.0, 0.0, 0.0] is the negative X axis
[  1.0, 0.0, 0.0] is the positive X axis

##########################   Tire axis

def Tire_Axis():

    # tire axis attached to axle
    tire_0_Axis = [ -1.0, 0.0, 0.0]   # front driver's tire
    tire_1_Axis = [ -1.0, 0.0, 0.0]   # front passenger's tire
    tire_2_Axis = [ -1.0, 0.0, 0.0]   # rear driver's tire
    tire_3_Axis = [ -1.0, 0.0, 0.0]   # rear passenger's tire
   
    return (tire_0_Axis, tire_1_Axis, tire_2_Axis, tire_3_Axis)

 
  
8.  Car Setup:  Tire Steering  (Line Numbers:  169 - 180)

Note:
Tires that have steering.  True means that the tire is used for steering.  False means that the tire isn't used for steering.

##########################   Tire steering

def Tire_Steering():

    # tire has steering
    tire_0_Steering = True   # front driver's tire
    tire_1_Steering = True   # front passenger's tire
    tire_2_Steering = False   # rear driver's tire
    tire_3_Steering = False   # rear passenger's tire
   
    return (tire_0_Steering, tire_1_Steering, tire_2_Steering, tire_3_Steering)

 
 
 
pageok