Thread: Three questions
View Single Post
  #3  
Old 05-22-2012, 09:23 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
1) Setting the specular color on the light to black should effectively disable specular casting:
Code:
light.specular(viz.BLACK)
2) Contact groups are supported but not documented yet. Here is an example on how to use them:
Code:
import viz
import vizshape
viz.go()

#Enable physics
viz.phys.enable()

#Create floor
floor = viz.add('ground.osgb')
floor.collidePlane()
floor.commandPhysics(26,'',1) #Set contact group to 1

#Create sphere
sphere = vizshape.addSphere(pos=(0,2,10))
sphere.collideSphere()

#Create cube
cube = vizshape.addCube(pos=(0.1,5,10))
cube.collideBox();
cube.commandPhysics(26,'',2) #Set contact group to 2

#Disable contacts between groups 1 and 2
viz.phys.command(3,'',1,2,0)
3) Dynamics on mesh shapes is not supported in the version of ODE/Opal used by Vizard. Are you positive it is supported by OPAL? The link you posted just describes how to create mesh shapes, it does not mention enabling dynamics on the mesh.
Reply With Quote