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 to
1.- concavity
bool, optional When
False(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 When
True, body will be included in collision checking calculations. Defaults toTrue.- color
tupleoffloat RGBa color components of the body.
- path
- Returns: