wheelCollider, change values by script

Hello, i need change some wheelcollider values, exactly the sidewaysFriction.extremumValue from default(20000) to 2000 by script, but i cant do work

col.suspensionSpring = js

col.radius = radius;

col.mass = WheelMass;

//this is i need change the value from 20000 default to 2000

col.sidewaysFriction.extremumValue

You have to define the Wheel Collider first and then change its values… Foe example :

public WheelCollider col; // Drag your wheel collider here in inspector

// In Update or your function : 

col.sidewaysFriction.extremumValue = 2000;
col.mass = WheelMass;
col.suspensionSpring = js;

Hope it works…

works :slight_smile:
thank you!