# 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: Exactly how does friction direction 2 work? - Unity Answers

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))

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).