Doc:2.6/Manual/Game Engine/Python API/Bullet physics

提供: wiki
< Doc:2.6‎ | Manual‎ | Game Engine‎ | Python API
2018年6月29日 (金) 04:45時点におけるYamyam (トーク | 投稿記録)による版 (1版 をインポートしました)
(差分) ← 古い版 | 最新版 (差分) | 新しい版 → (差分)
移動先: 案内検索

Bullet physics Python API

Bullet Physics provides collision detection and rigid body dynamics for the Blender Game Engine. It takes some settings from Blender that previously were designed for the former collision detection system (called Sumo).

However, new features don’t have an user interface yet, so Python can be used to fill the gap for now.

Features:

  • Vehicle simulation.
  • Rigid body constraints: hinge and point to point (ball socket).
  • Access to internal physics settings, like deactivation time, debugging features.

Easiest is to look at the Bullet physics demos, how to use them. More information can be found here.

Python script example:

import PhysicsConstraints
print dir(PhysicsConstraints)
Note about parameter settings
Since this API is not well documented, it can be unclear what kind of values to use for setting parameters. In general, damping settings should be in the range of 0 to 1 and stiffness settings should not be much higher than about 10.