PyBullet: fix createMultiBodyBatch.py example
This commit is contained in:
@@ -117,14 +117,14 @@ for x in range(32):
|
|||||||
batchPositions.append(
|
batchPositions.append(
|
||||||
[x * meshScale[0] * 5.5, y * meshScale[1] * 5.5, (0.5 + z) * meshScale[2] * 2.5])
|
[x * meshScale[0] * 5.5, y * meshScale[1] * 5.5, (0.5 + z) * meshScale[2] * 2.5])
|
||||||
|
|
||||||
bodyUid = p.createMultiBody(baseMass=0,
|
bodyUids = p.createMultiBody(baseMass=0,
|
||||||
baseInertialFramePosition=[0, 0, 0],
|
baseInertialFramePosition=[0, 0, 0],
|
||||||
baseCollisionShapeIndex=collisionShapeId,
|
baseCollisionShapeIndex=collisionShapeId,
|
||||||
baseVisualShapeIndex=visualShapeId,
|
baseVisualShapeIndex=visualShapeId,
|
||||||
basePosition=[0, 0, 2],
|
basePosition=[0, 0, 2],
|
||||||
batchPositions=batchPositions,
|
batchPositions=batchPositions,
|
||||||
useMaximalCoordinates=True)
|
useMaximalCoordinates=True)
|
||||||
p.changeVisualShape(bodyUid, -1, textureUniqueId=texUid)
|
p.changeVisualShape(bodyUids[0], -1, textureUniqueId=texUid)
|
||||||
|
|
||||||
p.syncBodyInfo()
|
p.syncBodyInfo()
|
||||||
print("numBodies=", p.getNumBodies())
|
print("numBodies=", p.getNumBodies())
|
||||||
|
|||||||
Reference in New Issue
Block a user