WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 10-26-2011, 01:45 PM
fivel_lab fivel_lab is offline
Member
 
Join Date: Mar 2011
Posts: 36
works, thanks =-)

as for why i didn't want the block to be a child of the board, whenever i had it set up that way, the ball wouldn't slide the way i wanted it to. again, not sure why...
Reply With Quote
  #2  
Old 10-26-2011, 02:08 PM
fivel_lab fivel_lab is offline
Member
 
Join Date: Mar 2011
Posts: 36
ok, new issue...

the block slides off more often than i expected during my trial runs, so i'm thinking of including "bookends" on the ends of each side of the board.

Code:
	
        global bar 
	bar = viz.add('box.wrl')
	bar.setScale([BARLENGTH, CUBESIZE,CUBESIZE])
	bar.setPosition(CENTERPOS)
	bar.color(viz.BLACK)
	barCollideShape = bar.collideBox()
	barCollideShape.setDensity(DENSITY)
	barCollideShape.setFriction(FRICTION)

        end1=bar.add('box.wrl')
	end1.setPosition((CENTERPOS[0]-.55, CENTERPOS[1]-4,     CENTERPOS[2]-5))
	end1.color(viz.WHITE)
	end1.setScale([.05,3,1])
	end1Collide = end1.collideBox()
	end1.disable(viz.DYNAMICS)
	end1Collide.setDensity(DENSITY)
when i use .disable(viz.DYNAMICS), the block slides right through the bookend, but without it, the bookend itself behaves crazily.
Reply With Quote
  #3  
Old 11-02-2011, 07:24 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
If you increase the scale value for the X dimension does it make a difference?
Code:
end1.setScale([.05,3,1])
Reply With Quote
Reply


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
retrieve Object names Geoffrey Vizard 11 12-11-2009 04:26 AM
Get a user's current position from an object? cgibb Vizard 2 06-03-2009 05:47 PM
Randomising position of an object ptjt255 Vizard 11 10-23-2008 02:27 AM
Can you link the position of a tracker to the orientation of an object? michaelrepucci Vizard 1 09-19-2008 10:23 AM
Getting object position in screen coordinates v-Salik Vizard 1 10-19-2007 03:41 PM


All times are GMT -7. The time now is 12:02 PM.


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