WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 02-28-2005, 10:41 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
When using the collidebox function, if you don't pass any values Vizard will automatically calculate the bounding box of the object and use it for collisions. Try using this with your tables, however, if you scale the table in Vizard then it won't work.

To make an invisible box you would do as you suggested and set the visibility to 0.

There is a way to make sure the ball doesn't go through walls. Intersect the line from the balls previous position and current position with the scene. If it intersects with the room then you know you have a collision. Example:
Code:
info == room.intersect(prevPos,curPos)
if info.intersected:
	print 'ball has gone through a wall'
Reply With Quote
 

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


All times are GMT -7. The time now is 12:07 AM.


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