WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 03-19-2009, 10:05 AM
Moh200jo Moh200jo is offline
Member
 
Join Date: Feb 2009
Posts: 99
strike the boxes

Is there any help to strike the boxes by avatar?
Thanks
Code:
import viz
viz.go()

room=viz.add('court.ive')
room.setPosition(0,0,25)
avatar=viz.add('vcc_male.cfg')
avatar.setPosition(0,0,3)
view = viz.MainView
link = viz.link(avatar, view)
link.preTrans([0,-.5,-6])
boxes=[]
for i in [9,15,30]:
	box = viz.add('box.wrl')
	box.setPosition(0,1,i)
	box.setScale(.5,.5,.5)
	coll=box.collideBox()
	#box.enable(viz.COLLIDE_NOTIFY)
	boxes.append( box )

walk = vizact.walkTo([0,0,15])
vizact.onkeydown(' ', avatar.addAction, walk)
Reply With Quote
  #2  
Old 03-19-2009, 02:16 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
You'll need to turn on the physics engine and add a collision shape to your avatar like a collideBox and a collidePlane to the room so the avatar does not go through the floor. You can also experiment with the density of the avatars collideBox so the avatar does not get pushed around from the collision.
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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
Turning info boxes on and off Karla Vizard 2 12-17-2007 03:13 PM
problem with input boxes shai Vizard 6 08-15-2005 10:51 AM


All times are GMT -7. The time now is 04:50 AM.


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