PyBulletClient.body_from_obj
-
PyBulletClient.
body_from_obj
(path, scale=1.0, concavity=False, mass=0, collision=True, color=(0.5, 0.5, 0.5, 1))[source] Create a PyBullet body from an OBJ file.
- Parameters
path (
str
) – Path to the OBJ file.scale (
float
, optional) – Factor by which to scale the mesh. Defaults to1.
concavity (
bool
, optional) – WhenFalse
(the default), the mesh will be loaded as its convex hull for collision checking purposes. Only applicable to static (massless) objects. For non-static meshes, use OBJs preprocessed bypybullet.vhacd
.mass (
float
, optional) – Mass of the body to be created, in kg. If 0 mass is given (the default), the object is static.collision (
bool
) – WhenTrue
, body will be included in collision checking calculations. Defaults toTrue
.
- Returns