WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 05-06-2009, 02:55 PM
Chrissy2009 Chrissy2009 is offline
Member
 
Join Date: May 2009
Posts: 33
Collision problem: Balls fly through the wall

Hi,

I want create a billiard game inside a room. So I created a box in 3ds Max and set the viewpoint and the 15 balls into this box. This works very fine.

Code:
court = viz.add('world.wrl') 
court.collideMesh()
....
ball.collideNone()
ballPhysicalShape = ball.collideBox()

But now my problem:
If I initiate the shoot, the balls fly across the room and always collide with the walls. This is okay!

But if I shoot them faster or if I set the bounce value from 0.5 to 2, they just fly through the wall.

I don't know what's the matter for this action.

Can anybody help me?

Thanks a lot.
Christina
Reply With Quote
  #2  
Old 05-06-2009, 03:42 PM
Moh200jo Moh200jo is offline
Member
 
Join Date: Feb 2009
Posts: 99
Christina, I suggest to look at this script
Reply With Quote
  #3  
Old 05-06-2009, 11:28 PM
Chrissy2009 Chrissy2009 is offline
Member
 
Join Date: May 2009
Posts: 33
Hey Moh200jo,

thanks for your answer, but I don't think this is my problem.

Look at the demo physics2.py:

You can shoot balls against the boxes. The MIN_POWER is 1 and for example the MAX_POWER is 80. This works all right. But if you change the MAX_POWER to 8000 you can see, that it will be possible to shoot the ball against the boxes, but they never collide. The ball ist too fast and will fly through the wall, without colliding.

The duckcourt.py has the same problem: If you change the BALL_SPEED from 5 to 500 and shoot a ball, you can see that the ball never collide with the ducks.

And exactly this is my problem. If I shoot the first ball too fast against the other balls, they collide and fly across the room. And because of their speed, they never collide with the walls.

Hope anybody can help me....
Reply With Quote
  #4  
Old 05-07-2009, 04:52 AM
Moh200jo Moh200jo is offline
Member
 
Join Date: Feb 2009
Posts: 99
HI
Oh, I believe collision at vizard runs like this. I correct you have to play in your code to decrease the ball speed at exact distance between them. If you got something easier please let me know because I have this issue.
Reply With Quote
  #5  
Old 05-10-2009, 01:13 PM
Chrissy2009 Chrissy2009 is offline
Member
 
Join Date: May 2009
Posts: 33
Hi Moh200jo,

sorry but I didn't get this.

I ought to decrease the ball speed at which value? The distance between whom?

Thanks in advance!
Reply With Quote
  #6  
Old 05-11-2009, 02:07 AM
Moh200jo Moh200jo is offline
Member
 
Join Date: Feb 2009
Posts: 99
well, just for any speed would be worked with your collision. the distance I have talked about which is between ball and wall (ROOM).
Hope this will help you.
Reply With Quote
  #7  
Old 05-11-2009, 09:03 PM
Gladsomebeast Gladsomebeast is offline
Member
 
Join Date: Mar 2005
Location: Isla Vizta, CA
Posts: 397
Make the walls of your box bigger.
__________________
Paul Elliott
WorldViz LLC
Reply With Quote
  #8  
Old 05-11-2009, 09:04 PM
Gladsomebeast Gladsomebeast is offline
Member
 
Join Date: Mar 2005
Location: Isla Vizta, CA
Posts: 397
Bigger as in thicker.
__________________
Paul Elliott
WorldViz LLC
Reply With Quote
  #9  
Old 05-14-2009, 01:24 PM
Moh200jo Moh200jo is offline
Member
 
Join Date: Feb 2009
Posts: 99
Hi Paul,
I do not understand how this would does the collision; could you please provide me an example of this?
thanks
Reply With Quote
  #10  
Old 05-14-2009, 01:48 PM
Gladsomebeast Gladsomebeast is offline
Member
 
Join Date: Mar 2005
Location: Isla Vizta, CA
Posts: 397
Each frame, the physics engine updates the position of the balls, then checks if the balls are touching other solid stuff. If the balls move so fast that they are on the other side of a wall, free and clear, then no collision is detected.

A thicker wall makes is more likely the ball is within the wall, a collision is detected, and the balls stay in the box.

Should fix things, but the physics system can be kind of crazy.
__________________
Paul Elliott
WorldViz LLC
Reply With Quote
  #11  
Old 05-15-2009, 04:20 AM
Chrissy2009 Chrissy2009 is offline
Member
 
Join Date: May 2009
Posts: 33
Ah okay. Thank you for this information.

I'll make the walls thicker and will have a look what happens.
Reply With Quote
  #12  
Old 05-19-2009, 04:38 AM
Moh200jo Moh200jo is offline
Member
 
Join Date: Feb 2009
Posts: 99
could you please post an example on this issue?
Reply With Quote
Reply

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
PPT causing height problem just alex Precision Position Tracker (PPT) 2 01-30-2009 09:50 AM
Collision with child nodes rubberpimple Vizard 4 09-17-2008 04:27 PM
picking problem... k_iwan Vizard 2 07-27-2007 07:57 PM
problem with collision detection paulpars Vizard 6 06-09-2006 06:03 PM
problem with female animations vmonkey Vizard 1 10-07-2005 10:36 AM


All times are GMT -7. The time now is 11:58 AM.


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