Blender 2.6 Tutorial Using a Model of Car in the Game Engine - Making it More Stable Part 2

Опубликовано: 19 Октябрь 2024
на канале: 3D Blender Tutorials by ianscott888
6,517
39

This is the second part of a tutorial that shows how to use a model of a car, made in a previous tutorial, in the Blender game engine.

The game engine uses the Bullet Physics Simulation Library. In the library are routines for simulating four wheeled vehicles, these routines can be called from Python scripts.

This part of the tutorial shows how to use the scripts, taken from the site -

www.tutorialsforblender3d.com

This tutorial is based on a tutorial from this site.

Key Points -

Open the CarSetup.py script and set the wheel positions and the radius of the the wheels.

Add an Always sensor and a Python controller, link the controller to the CarSetup.py script.

Open the Suspension.py script. Add an Always sensor and a Python controller, link the controller to the Suspension.py script.

Click the start button to test that everything has been set up correctly, the car should have the wheels added and should bounce to the ground plane.

Open the Powertrain.py script, add a Keyboard sensor and a Python controller, linked to Powertrain.py. Add five more Keyboard sensors for the car controls.

To download the files used in the tutorial and for other resources go to my website http://blender.freemovies.co.uk