#1
|
|||
|
|||
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) |
#2
|
|||
|
|||
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.
|
|
|
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 |