Vehicle Wrapper -- Blender 3D Game Engine





 
 




Quick Instructions

1.  Position the car's object center (center of gravity).
 
2.  Check/align car axis.
Car model: 
y-axis is length. 
x-axis is width. 
z-axis is height
Note:  The vehicle wrapper uses the y-axis for movement. 
   
3.  Object type: Rigid body -- Enable No sleeping
Buttons Window menu >> Logic (F4)
Object Type:  Rigid body
Enable No sleeping
 
4.  Set Car Mass
Mass:
Weight of the car.
Range:  0.01 to 10,000.00
 
5.  Collision Bounds:  Convex Hull
Buttons Window menu >> Logic (F4)
Bounds button
Convex Hull
 
6.  Check/align the Tire axis
Tire model: 
y-axis is length. 
x-axis is width. 
z-axis is height
Note:  The vehicle wrapper uses the y-axis for movement. 
 
7.  Tire Object Type:  No Collision
Buttons Window menu >> Panels Logic (F4) button
Object Type
No Collision
 
8.  Add CarSetup.py to the Text Editor
Download:
Text Editor menu >> Text >> Open
Rename CarSetup.txt to CarSetup.py
   
9.  CarSetup.py ---  Tire Names  (Line Numbers:  83 - 106)
   
10.  CarSetup.py ---  Tire Positions  (Line Numbers:  107 - 118)
   
11.  CarSetup.py ---  Tire radius  (Line Numbers:  119 - 130)
 
12.  CarSetup.py ---  Suspension Height  (Line Numbers:  131 - 142)
 
13.  Car Setup:  Tire Suspension Angle  (Line Numbers:  143 - 154)
 
14.  Car Setup:  Tire Axis  (Line Numbers:  155 - 167)
 
15.  Car Setup:  Tire Steering  (Line Numbers:  169 - 180)
 
16.  Add an Always Sensor:  set to Run Once
Buttons Window menu >> Logic (F4)
Sensors
Add
Always
Set to Run Once
 
17.  Add a Python Controller:  Use CarSetup.py
Buttons Window menu >> Logic (F4)
Controllers
Add
Python
Script:  CarSetup.py
 
18.  Add an AND Controller
Buttons Window menu >> Logic (F4)
Controllers
Add
AND 
 
19.  Add an State Actuator
Buttons Window menu >> Logic (F4)
Actuators
Add
State:
Bit Operation:  Cpy
State Mask Group: 2
 
20.  Connect the Always Sensor to the Python Controller
      Connect the Always Sensor to the AND Controller
      Connect the AND Controller to the State Actuator
Buttons Window menu >> Logic (F4)
Pull wire from brass bump to brass dimple
 
21.  Start Game Engine
P key
or
User Preference menu >> Game >> Start Game
 

    
pageok