Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark Physics & Dark A.I. & Dark Dynamix / Bouncing ball question

Author
Message
Coin
19
Years of Service
User Offline
Joined: 15th Mar 2005
Location: Bexley, UK
Posted: 11th Feb 2008 21:30
I am in the very early stages of a pool-type game and have created a crude temporary "pool table" from five 3D primitives for testing purposes. I have assigned materials to each of the four "cushions" and "table-top" and can successfully make the "ball" bounce between opposite cushions until it slows to a halt. However, if the ball hits a cushion at slow speed it appears to stick to it. I assumed that the PHY SET BOUNCE THRESHOLD instruction would resolve this, but no matter what negative value I give it (even 0), this has no effect on the sticky ball at low speeds. Which instruction am I overlooking?

A secondary problem is that the ball loses speed at different rates. When moving quickly it loses speed rapidly, but, after slowing down, it takes a long time to come to a complete halt. A uniform deceleration would be more realistic; I assume this is just a matter of designing the table-top material correctly.
monotonic
18
Years of Service
User Offline
Joined: 24th Mar 2006
Location: Nottinghamshire, England
Posted: 11th Feb 2008 23:09
You could try using dbPhySetMaterialRestitution and set the restitution value for the material of the cushions.

Projects Started: 20
Projects Completed: 0
Coin
19
Years of Service
User Offline
Joined: 15th Mar 2005
Location: Bexley, UK
Posted: 13th Feb 2008 13:06
Thanks for the reply, but I have already experimented with the restitution settings. It currently stands at 1.0 for cushions (maximum bounce) and 0.0 (no bounce) for the table top. I've played with other settings - a couple of which I don't even understand (like anistrophy) - and I'm not really sure what to try next.
Coin
19
Years of Service
User Offline
Joined: 15th Mar 2005
Location: Bexley, UK
Posted: 19th Feb 2008 00:45
Have I really defeated everyone with this question?
jason p sage
16
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 20th Feb 2008 23:35
Personally - if I can't get something to work the way I want. I Force it.

You could apply your own dampening - in other words - add your own... "Forces" opposite the direction the balls are going - or tweaks reading/modiy/write the velocity and rotation values.

Coin
19
Years of Service
User Offline
Joined: 15th Mar 2005
Location: Bexley, UK
Posted: 21st Feb 2008 12:50
Thank you for that - it gives me a few more clues. I was hoping that the use of Dark Physics would mean not having to invent tweaks such as these, (plus all my own collision checking) but it is not to be.

Login to post a reply

Server time is: 2024-05-19 23:57:35
Your offset time is: 2024-05-19 23:57:35