Fix sign in cylinder support function.

PiperOrigin-RevId: 785394029
Change-Id: I010edab0ba8734a9b91626669fa309a0ddb346e5
This commit is contained in:
Kyle Bayes
2025-07-21 05:10:57 -07:00
committed by Copybara-Service
parent db72d0d53c
commit 3283fb8655
+1 -1
View File
@@ -304,7 +304,7 @@ static void mjc_cylinderSupport(mjtNum res[3], mjCCDObj* obj, const mjtNum dir[3
}
// set result in Z direction
tmp[2] = mju_sign(local_dir[2]) * size[1];
tmp[2] = local_dir[2] >= 0 ? size[1] : -size[1];
// transform result to global frame
localToGlobal(res, mat, tmp, pos);