WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 01-23-2017, 11:45 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
Reducing the bounce of the box may help prevent it from falling over after it's dropped. Here's an example:

Code:
'''
Press spacebar to enable physics and drop the box
'''

import viz
import vizact
import vizshape
import vizinfo

viz.go()
vizinfo.InfoPanel()

viz.clearcolor(viz.SLATE)
ground = viz.add('ground.osgb')
ground.collidePlane()

box = vizshape.addBox(size=(.4,2,0.4),pos=[0,20,8])
shape = box.collideBox()
shape.setBounce(0.01)

vizact.onkeydown(' ',viz.phys.enable)
If you want objects to snap into place after colliding try handling the collision event and then animate or directly place the object where you want it to go.
Reply With Quote
 

Tags
@jeff


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
Augmented Reality: virtual world not overlapping real world correctly Vaquero Vizard 7 04-15-2016 01:14 AM
Making Virtual World Using Video Recording Hitesh Vizard 2 06-22-2015 09:03 AM
Showing another program in a virtual world Frank Verberne Vizard 3 01-16-2013 10:26 AM
why is time faster in my virtual world? billjarrold Vizard 1 11-24-2009 05:33 PM
Vizard as a social virtual world engine Gerard Vizard 3 02-14-2008 02:22 PM


All times are GMT -7. The time now is 03:11 PM.


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