![]() |
|
#1
|
|||
|
|||
|
Collision detection with InfiniteTerrain Generator
I am wondering if there is anyway to activate collision detection with the infinite terrain generator (InfiniteTerrain.dlc). Given below is a simple example of code, and if you copy/paste and run it in vizard you will see that the ball falls straight through the infinite plane without colliding with it. Anyone Have any suggestions?
import viz viz.go() #Turn on the physics engine viz.phys.enable() viz.MainView.setPosition([0,180,0]) viz.MainView.setEuler( [0,40,0] ) viz.MainView.getHeadLight().disable() #add sun-like directional light l = viz.addLight() l.position(0, 1, -.2, 0) #sets light direction terrain = viz.add('InfiniteTerrain.dlc',1,'300',6,7,15000,0. 001) grass = viz.addTexture('gb_noise.jpg') terrain.texture(grass) terrain.collideMesh() ball = viz.add('ball.wrl') ball.collideBox(density=5) ball.setScale([50,50,50]) ball.setPosition([0,100,100])[/COLOR] |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Collision detection | Moh200jo | Vizard | 1 | 01-27-2010 08:39 AM |
| Collision detection with specific models | just alex | Vizard | 1 | 02-06-2009 12:02 PM |
| Collision Detection and Nearest Point to Probe | xabbu | Vizard | 2 | 01-06-2009 04:01 AM |
| Collision detection with haptic pen | mjabon | Vizard | 3 | 01-17-2008 07:35 PM |
| Walking avatars --> collision detection? | sjroorda | Vizard | 3 | 10-13-2005 05:47 AM |