View Single Post
  #1  
Old 05-05-2009, 09:56 AM
durf durf is offline
Member
 
Join Date: Feb 2009
Posts: 61
Physics Question

Hi,

Im trying to have a ball fall from a certain height and pass through a floor but have it land on the floor below it. Can anyone explain what I am doing wrong?

Thanks

Code:
import viz
viz.go()

viz.phys.enable()

viz.MainView.setPosition([0,10,-35]) #sets camera position
viz.MainView.setEuler([0,2,0]) #sets camera pitch

ground1 = viz.add('tut_ground.wrl')
ground1.disable(viz.PHYSICS)

ground2 = viz.add('tut_ground.wrl')
ground2.setPosition([0,-2,0])
ground2.collidePlane()

ball = viz.add('ball.wrl',pos=[0,15,6]) # Add a ball
ballPhys = ball.collideSphere() # Enable physics on ball
Reply With Quote