WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 09-14-2010, 12:07 AM
vJimZ vJimZ is offline
Member
 
Join Date: Sep 2010
Location: Stanford University
Posts: 2
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####
#######################################
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Interactive Window ChrisB Vizard 1 01-19-2005 10:36 AM


All times are GMT -7. The time now is 06:56 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC