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 /
This question was closed Jul 24, 2013 at 09:34 PM by clunk47 for the following reason:

Problem is not reproducible or outdated

avatar image
0
Question by Deleted · Dec 10, 2012 at 04:04 PM · rotationmaterialdragsmoothfriction

Smooth material of cylinders

Hi, I'm new to Unity and I'm trying to develop an air hockey game. I've been focusing on the physics and I've got a problem: When the Player collides the puck, in some way the puck gets "linked/anchored/catched" by the Player unless the corner between the Player and the puck is not high. If I do not freeze the Y axys, then it's way smoother, but not enough for me. (And I don't want the puck to keep rotating too!). Both Player and puck are cylinders and I would like to make rotation more fluent, just like if the material is smoothened. (Already played with drag and friction)

Any concrete help will be really appreciated!

Screenshot: http://s11.postimage.org/7b4fce9ht/Senza_titolo_2.jpg

Comment
Add comment · Show 2
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 Owen-Reynolds · Dec 10, 2012 at 04:31 PM 0
Share

By "it's way smoother" do you mean that it "sticks" a lot less, but still seems caught for a moment?

Are you moving the player using physics (setting velocity or using AddForce) or are you just setting position of the player?

Does the bug happen when the puck hits a non-moving player, or only when the player moves quickly into the puck?

avatar image Deleted · Dec 10, 2012 at 05:45 PM 0
Share

Yes, it's like the surface is gummy ins$$anonymous$$d of icy anyway. I'm moving the player using AddForce. The bug happens when the player touches the puck: ins$$anonymous$$d of sliding away, the puck is catched by the player, rounds for 1/4 of the Player cylinder and goes away. It's a bit difficult to explain by words.

2 Replies

  • Sort: 
avatar image
0

Answer by sparkzbarca · Dec 10, 2012 at 04:30 PM

is your player a mesh?

If so check the smooth sphere collisions. That will smooth out the collisions with spheres (or in this case sphere like objects)

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 Deleted · Dec 10, 2012 at 06:07 PM 0
Share

It's a rigidbody with capsule collider.

avatar image
0

Answer by Owen-Reynolds · Dec 12, 2012 at 03:50 AM

Maybe check the contact area of the capsules. They should be hitting straight-edge to straight-edge, as if they were cylinders. If the puck hits the player where it starts to dip into the ground, physics will try to force the puck downwards. For me, it just loses a lot of speed, but your set-up could be trapping the puck down there.

To line them up, you can not have a floor (if everything has Y locked.) Or set the floor and player layers not to interact (so the player collider can hang through the floor, presenting a nice vertical edge for the puck.)

A capsule collider, like you're using, is going to give the smoothest performance. It uses exact math to give two round things bouncing off each other, and runs faster than a mesh collider.

Are you using a physics material? That can help with a stronger bounce effect.

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 Deleted · Dec 12, 2012 at 11:05 AM 0
Share

Hi, the problem is that I need gravity to work (to make both player and ball stop). Anyway I made a test without the field and the gravity but the behaviour was the same. The bounciness is not what I'm looking for, because it's enabled only when the puck and the player enter collision and not during collision.

avatar image Owen-Reynolds · Dec 12, 2012 at 02:45 PM 0
Share

Gravity makes it stop because of friction with the ground? That can also be done with code (set drag, and stop when `velocity.sqr$$anonymous$$ag<0.3ish`.)

I'd keep testing by removing things, like maybe some stuff in the script. Normal collisions don't stick like that. Eventually you'll change/remove one thing and the sticking will go away. Or restart. It will bounce normally. Then add things back until it sticks.

Follow this Question

Answers Answers and Comments

12 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

Related Questions

Wheel Friction Curve being weird (simple question) 0 Answers

Smooth Rotation Help 1 Answer

fixed rotation of material (or texture) for a rotating gameObject 0 Answers

Changing two different objects renderer colour 1 Answer

How do I rotate something smoothly? 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