Merge pull request #1609 from YunfeiBai/master

Add PyBullet API to set projective texture.
This commit is contained in:
erwincoumans
2018-03-26 16:27:14 -07:00
committed by GitHub
14 changed files with 123 additions and 11 deletions

View File

@@ -25,7 +25,12 @@ if (useRealTimeSimulation):
while 1:
if (useRealTimeSimulation):
camera = p.getDebugVisualizerCamera()
viewMat = camera[2]
projMat = camera[3]
#An example of setting the view matrix for the projective texture.
#viewMat = p.computeViewMatrix(cameraEyePosition=[7,0,0], cameraTargetPosition=[0,0,0], cameraUpVector=[0,0,1])
p.getCameraImage(300, 300, renderer=p.ER_BULLET_HARDWARE_OPENGL, flags=p.ER_USE_PROJECTIVE_TEXTURE, projectiveTextureView=viewMat, projectiveTextureProj=projMat)
p.setGravity(0,0,0)
sleep(0.01) # Time in seconds.
else:
p.stepSimulation()