View Single Post
  #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