I’m not sure if i’m going in the right direction with the code below. Does anyone know if below is a good method to do this? I can’t use drag because I can’t apply drag to a direction or single axis right?
//get relative velocity
relativeV = transform.InverseTransformDirection (rigidbody.velocity);
//if its over the clamp value on the relative x axis
if (relativeV.x > clamp1.x) {
//This is the part im confused about. Does the below line make sense? I was trying to take the difference of the amount over the clamp and the clamp and set it just below the clamp.
rigidbody.velocity -= transform.TransformDirection(transform.right} * (relativeV.x-(clamp1.x-10))
}