• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
0
Question by BigPhan · Dec 15, 2019 at 05:27 PM · collisionphysicspoolbouncinesselastic

(Pool/8Ball Game) Strange Elastic Collisions

alt text

So in my pool game, I'm trying to create perfectly inelastic collisions. In my scene, there's a basic setup of the pool balls shown above. A white cue ball has a script that applies a velocity onto it so that it can simulate a break shot.

What (I'm pretty sure) should happen is that when the white ball hits the front pool ball, the momentum is mostly transferred from ball to ball all the way to the back ball (shown in black). The black ball will receive most of the momentum while the other balls won't move as much.

However, what ends up happening every time, no matter what I tweak, is that every ball behind the front pool ball is hit with the same momentum, at the same time. I have no idea why this should be happening. If anyone knows how to achieve this sort of collision or if anyone knows how pool physics actually work then please let me know.


Every pool ball (including the cue ball) has a physics material with both frictions set to 0 (friction type Average) and its bounciness set to 1(bounciness type Multiply). Every pool ball's rigidbody has a mass of 20, a drag of 1, an angular drag of 1, and is set to Continuous Dynamic collision detection. The BouncinessThreshold is set to 0. The plane that the balls are rolling on doesn't have a physics material attached.

why.png (270.1 kB)
Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image lgarczyn · Dec 16, 2019 at 04:53 AM 0
Share

Please provide the script that applies the momentum.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Bunny83 · Dec 15, 2019 at 09:26 PM

Uhm, why perfectly inelastic? Pool balls have an almost perfect elastic nature though I guess that's what you mean based on your images ^^.


There are several things not clear. First of all do you actually use 3d physics or 2d physics? They use completely different physics systems. You have some really strong overlaps between your balls which usually shouldn't happen. Next thing is based on your right most image it looks like you hit the first ball pretty much in the center. So of course it's energy would propergate in the same direction. Which means that it would hit the next two balls almost equally.


Finally note that PhysX (Physics) as well as Box2d (Physics2D) are just implement a rough approximation of real world physics. Any processes which happens on a microscopic level within a short time span won't be simulated "correctly" since the simulation happens at discrete timesteps. You could try boosting up the solver count in the physics settings. However it may serverely impact the performance and does not necessarily solve your issue.


I gave a similar answer about 6 years ago. However some things have changed since then. You can now drive the physics system manually doing smaller timesteps might help, however as explained it might not necessarily fix your issues.


Also check your velocity thresholds in the physics settings. Any collision below that threshold is always treated inelastic. This is to stop tiny amounts of energy to bounce endlessly between many bodies. You might want to lower them.

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Bunny83 · Dec 15, 2019 at 09:36 PM 0
Share

ps: which Unity version do you use? Unity has changed the physX version since 2018.3beta

avatar image lgarczyn Bunny83 · Dec 16, 2019 at 04:53 AM 0
Share

Just to clear a point of confusion, the green arrow you see in his picture is not part of drawing, and doesn't represent the momentum applied, it's just the unity translate tool.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

301 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Ball passes through the floor on movement 1 Answer

Sphere bouncing back on edges of aligned objects 0 Answers

Unity 2D colliders not triggering,Unity 2D collider not triggering 0 Answers

Bounce between two exact points 1 Answer

Collision detection against piled objects is buggy 2 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges