Add Bullet C API and pybullet API to set projective texture matrices.
This commit is contained in:
@@ -25,8 +25,12 @@ if (useRealTimeSimulation):
|
||||
|
||||
while 1:
|
||||
if (useRealTimeSimulation):
|
||||
p.getCameraImage(300, 300, lightColor=[1.0,0.0,0.0], renderer=p.ER_BULLET_HARDWARE_OPENGL, flags=p.ER_USE_PROJECTIVE_TEXTURE)
|
||||
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()
|
||||
|
||||
Reference in New Issue
Block a user