View Single Post
  #4  
Old 10-26-2011, 02:08 PM
fivel_lab fivel_lab is offline
Member
 
Join Date: Mar 2011
Posts: 36
ok, new issue...

the block slides off more often than i expected during my trial runs, so i'm thinking of including "bookends" on the ends of each side of the board.

Code:
	
        global bar 
	bar = viz.add('box.wrl')
	bar.setScale([BARLENGTH, CUBESIZE,CUBESIZE])
	bar.setPosition(CENTERPOS)
	bar.color(viz.BLACK)
	barCollideShape = bar.collideBox()
	barCollideShape.setDensity(DENSITY)
	barCollideShape.setFriction(FRICTION)

        end1=bar.add('box.wrl')
	end1.setPosition((CENTERPOS[0]-.55, CENTERPOS[1]-4,     CENTERPOS[2]-5))
	end1.color(viz.WHITE)
	end1.setScale([.05,3,1])
	end1Collide = end1.collideBox()
	end1.disable(viz.DYNAMICS)
	end1Collide.setDensity(DENSITY)
when i use .disable(viz.DYNAMICS), the block slides right through the bookend, but without it, the bookend itself behaves crazily.
Reply With Quote