Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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
0
Question by Matt Clark · Nov 17, 2013 at 10:46 PM · collisionphysicsanimation editorphysics settings

Animated mesh collider

I have an animated mesh that I need to hit a ball. It does hit it, but even though the physics material on the animated mesh is set to rubber it doesn't bounce. It actually kills all the momentum and just rolls slowly away. I've tried every setting I can think of but no luck. Any ideas?

Comment
Add comment · Show 4
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 supernat · Nov 18, 2013 at 02:39 AM 0
Share

I would think you would want the ball to have a rubbery material and the mesh (a bat?) to have a very solid material. Are you moving the animated mesh manually or letting the kinetics drive it's interaction with the ball? If you let Unity handle the response between the two objects, you might see the animated mesh flying away when it hits the ball. $$anonymous$$ake sure, to avoid that, that the ball mass is way way smaller than the animated mesh's mass.

avatar image Matt Clark · Nov 18, 2013 at 03:01 AM 0
Share

it's a flipper and a pinball, so I have the flipper be rubby and the ball be metal. The flipper has an animation that plays when you hit the button. The many physics settings I use are "Convex" on the mesh collider for the flipper. Animate Physics on the animator of the flipper. "Is $$anonymous$$inematic" on the flipper and "Interpolate" and "Continuous Dynamic" on both the flipper and the ball. Hopefully that makes it clearer.^^

avatar image supernat · Nov 18, 2013 at 03:55 AM 0
Share

That is more clear, yes in this case it makes more sense the way you have it. I think this is a problem in that the flipper might be moving too fast, so the surface of the ball falls beneath the surface of the flipper on several frames. The easy solution is to add an OnCollisionEnter method to the flipper, then call AddForce() on the ball that is passed into that method. You are essentially simulating what the flipper would do, add force, but the physics engine can't estimate due to its discreet nature (even with continuous selected). You can also increase the amount of bounce of the ball by setting the flipper physic material to $$anonymous$$aximum for the bounce Combine value. You might even use the collider's AddExplosionForce method to add some spice to it.

avatar image supernat · Nov 18, 2013 at 04:08 AM 0
Share

A couple of other things. If you have issues with the ball falling through the flipper, you can increase the physics time steps by reducing the Fixed Timestep value in Project Settings ->Time. Obviously, depending on the hardware you publish to, this time may not be feasible if you make it too small. Additionally, you can increase the bounce effect by reducing the value for Bounce Threshold under. Project Settings->Physics. Lastly, I would suggest if possible to use a box collider for the flipper. Since the bottom of the flipper is less important, it probably won't matter to the player if the ball is hit just slightly out of sync when the ball is on the underside. Convex physics tests will be more time consu$$anonymous$$g.

0 Replies

· Add your reply
  • Sort: 

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

18 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

Related Questions

AddForce to a point of a GameObject, not the center 1 Answer

Camera gets flung off of the map when the player collides with certain objects. 0 Answers

Punching a crate 0 Answers

Imported 3D models collisions 1 Answer

FPS Tutorial: Why do my grenades go through the walls? 3 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