#1
|
|||
|
|||
Help Creating Interactive City Env from .dae
Hi everyone,
I'm fairly new to Vizard, and am having trouble making the environment map of a city interactive. The environment map is loaded from a .dae file, and contains the ground floor as well as a sea layer above it, and some buildings. I have an avatar moving around the world, controlled by arrow keys. I would like to make it so that the user cannot collide with either the buildings and the sea areas. I tried collisionMesh, collisionBox, and collisionSphere on both the avatar and the environ map variable and they do not work; the avatar simply walks through them. When I try a simple line like printing "collide" on collision, nothing happens. My code is: -------------------------------------------------------------------------- import necessary files viz.go() viz.clearcolor(viz.SKYBLUE) viz.phys.enable() #Resources #Builds the basic background resources city = viz.add('art/city.dae') city.setScale([.01,.01,.01]) city.collideMesh() viz.collision(viz.ON) viz.collisionbuffer(0.3) #######Add avatar details here############### male = viz.add('vcc_male.cfg') male.setPosition([10.0, 0, 40.0]) male.collideMesh() ### Sets the position to be just behind the avatar matrixPos = male.getPosition() matrixPos[2] = matrixPos[2] - 10 viz.MainView.setPosition(matrixPos) ## other functions here that account for movement#### ####################################### |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Interactive Window | ChrisB | Vizard | 1 | 01-19-2005 10:36 AM |