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 Brammel · Apr 04, 2015 at 04:22 PM · friction

Setup for anisotropic friction

I tried to make a setup to understand how physics materials work. but im kinda stuck on this topic.

i found this link that tries to explain it: http://answers.unity3d.com/questions/369066/exactly-how-does-friction-direction-2-work.html

though i am unable to reproduce what is being said there.

so in a bit more detailed steps i did:

  1. Create a cube.

  2. Create a plane.

  3. Add a rigid body to the cube.

  4. Add a script to the cube that calls WakeUp() on its attached rigid body every frame.

  5. Create a physics material

  6. Set dynamic and static friction of this material to 0.1

  7. Set dynamic2 and static2 friction of this material to 0.8

  8. Set friction direction 2 to (0,0,1).

  9. Add this physics material to the collider of the cube

now make sure the cube is positioned on top of the plane, and that gravity is applied to it (the checkbox on the rigidbody)

this is my current setup.

i press play, and rotate the plane (so the cube will slide due to gravity).

if i read that link correctly, there should be a large difference in how it slides towards the z axis compared to the other directions.

there is however not any noticeable difference in friction towards any direction.

can anyone provide me with a setup that gives me the expected outcome? or explain to me what i did wrong.

as a sidequestion, i plan on using this to model a car (hence, i need 2 directions (left/right) to have different friction values from forward and backwards) but the material only allows me to specify 1 direction.

does it math.abs the dot product of velocity/direction? (thus taking both the positive and negative axis of the specified vector. or do i need to apply some other magic to change both directions?

(tested in unity 5.0.1f1 (personal edition))

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

1 Reply

· Add your reply
  • Sort: 
avatar image
2

Answer by Destects2 · May 08, 2015 at 10:26 PM

Physic Material Anisotropic friction seems to be broken in unity 5, so the effect isn't observable, nor functioning, but in unity 4.x it works.

As for your question about direction, In my experience, you can just set the local axis you want the secondary friction values to apply to by setting either x, y, or z to 1. so for a material with a different left/right from forward/backward, let the first static/dynamic friction values act as the forward/backward, set the friction2 direction x to 1, and set the friction2 static/dynamic values as you want the left/right to be (assuming left/right is the x axis for you).

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 Brammel · May 12, 2015 at 05:53 AM 0
Share

Unfortunate to hear unity 5 no longer supports it.

although it wasnt that hard for me to work around it.

thanks for the answer though, ill keep it in $$anonymous$$d for co$$anonymous$$g projects.

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Wrong gravity calculation? 2 Answers

How to create varying friction in tracks? 1 Answer

Remove all friction from a supposedly frictionless wall 0 Answers

Unity 5 - Sliding Rigidbodies with maximum friction 2 Answers

2D Moving platforms is slippery! 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