Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 Jun 22
sparklines
Close Help
  • 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 /
avatar image
2
Question by helmi · Oct 27, 2010 at 05:43 AM · collideraddforceball

collider not working when apply "addForce" high enough

first time to ask question :), if this question had been answered please point me to the right one.

so, i have a sphere act like ball / or imagine pool / billiard game. i have plane with mesh collider and cube with mesh collider and i put wall material physic (when i remove it, doesn't solve the problem)., so the ball cant go off the plane.

when i addForce the ball the ball will bounce the cube collider. but when i addForce high enough, the ball will bounce off the cube, go through it, its like the cube collider doesn't working. sometimes it bounce 1-3 times then it bounced out.

i have ball physic apply on sphere also.

here my code to add force the ball :

rigidbody.AddForce(forceX*100*Time.deltaTime,0,forceZ*100*Time.deltaTime);

its Top View camera so i dont need y axis.

when forceX = 50 and forceZ = 50. the problem occur. i wondering why the ball can go through collider because i add force high enough to it.

please kindly giv direction. thanks

Comment
Add comment
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

2 Replies

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by jjobby · Oct 27, 2010 at 07:39 AM

You can also try to change setting of Collision Detection in Rigidbody. I never use this before but it's a new attribute in Unity3. So, I think it should work too.

http://unity3d.com/support/documentation/Components/class-Rigidbody.html

Collision Detection Used to prevent fast moving objects from passing through other objects without detecting collisions.

Discrete - Used for normal collisions (This is the default value).

Continuous - Used for objects which the Continuous Dynamic detection needs to collide with.(This has a big impact on physics performance, leave it set to Discrete, if you don't have issues with collisions of fast objects).

Continuous Dynamic - Used for fast moving objects.

If I understand correctly, you need to set Continuous to your cube and Continuous Dynamic to your ball. Hope this help.

Comment
Add comment · Show 1 · 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 helmi · Oct 27, 2010 at 09:20 AM 0
Share

Thanks you, i added continuous dynamic to my sphere, then voila, it works... i dont have rigidBody on my cube so no need set continuous on it.

avatar image
1

Answer by · Oct 27, 2010 at 05:58 AM

This is commonly known as the 'bullet through paper' effect.

In a single update, the ball is traveling far enough that it is on the other side of the collision.

UnifyCommunity has a 'DontGoThroughThings' script that "uses raycasting to avoid the physics engine letting fast-moving objects go through other objects (particularly meshes)."

Hope this helps.

Comment
Add comment · Show 1 · 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 cregox · Jan 27, 2011 at 11:10 PM 0
Share

This is perfect and much better on performance than using Collision Detection from rigidbodies! Thanks so much!

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.

Follow this Question

Answers Answers and Comments

No one has followed this question yet.

Related Questions

ball sometimes goes through the bat when hit... collider problem... How to do a Raycast? 0 Answers

Speed Cap for Rolling Ball 1 Answer

Attempting to make rigidbodies clump together, as if in a ball. 0 Answers

Collision going through collider 0 Answers

Add a force to a ball using the Boxcolliders AXIS 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges