Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'doc/python_api/examples/bge.constraints.py')
-rw-r--r--doc/python_api/examples/bge.constraints.py37
1 files changed, 0 insertions, 37 deletions
diff --git a/doc/python_api/examples/bge.constraints.py b/doc/python_api/examples/bge.constraints.py
deleted file mode 100644
index c617ac0622b..00000000000
--- a/doc/python_api/examples/bge.constraints.py
+++ /dev/null
@@ -1,37 +0,0 @@
-"""
-Basic Physics Constraint
-++++++++++++++++++++++++
-Example of how to create a hinge Physics Constraint between two objects.
-"""
-from bge import logic
-from bge import constraints
-
-# get object list
-objects = logic.getCurrentScene().objects
-
-# get object named Object1 and Object 2
-object_1 = objects["Object1"]
-object_2 = objects["Object2"]
-
-# want to use Edge constraint type
-constraint_type = 2
-
-# get Object1 and Object2 physics IDs
-physics_id_1 = object_1.getPhysicsId()
-physics_id_2 = object_2.getPhysicsId()
-
-# use bottom right edge of Object1 for hinge position
-edge_position_x = 1.0
-edge_position_y = 0.0
-edge_position_z = -1.0
-
-# rotate the pivot z axis about 90 degrees
-edge_angle_x = 0.0
-edge_angle_y = 0.0
-edge_angle_z = 90.0
-
-# create an edge constraint
-constraints.createConstraint(physics_id_1, physics_id_2,
- constraint_type,
- edge_position_x, edge_position_y, edge_position_z,
- edge_angle_x, edge_angle_y, edge_angle_z)