Files
RCBASIC4/doc/doc_files/sethingelimit.html
2026-02-26 15:33:51 -06:00

44 lines
2.0 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="style.css">
<meta content="text/html; charset=UTF-8" http-equiv="content-type">
<title>SetHingeLimit [RCBasic Doc] </title>
</head>
<body>
<p><h2>Sub SetHingeLimit( constraint_id, low, high, softness, bias_factor, relaxation_factor) </h2></p>
<p>
Defines the angular limits of the hinge's rotation. A hinge constraint allows two actors (or one actor and the world) to rotate around a single axis, similar to a door hinge. This function restricts how far this rotation can go by setting minimum and maximum angles.
</p>
<p>
By default, if no limits are applied, the hinge can rotate freely around the axis.
</p>
<ul>
<li>
low: This is the minimum angular limit. It defines the smallest angle that the hinge can rotate to in the negative direction.
</li>
<li>
high: This is the maximum angular limit. It defines the largest angle that the hinge can rotate to in the positive direction.
</li>
<li>
softness: Controls how "soft" the limit is. A value closer to 0 results in a hard limit (instant stop when the limit is reached), while a value closer to 1 allows some "give" before the limit fully takes effect, making the motion smoother as the limit is approached.
</li>
<li>
bias_factor: Helps to correct drift or penetration by applying a correction bias when the hinge reaches the limit. A higher value will apply a stronger bias to correct errors in the position.
</li>
<li>
relaxation_factor: Controls how the hinge behaves once the limit is reached. A value closer to 1 results in faster relaxation after hitting the limit, while a lower value makes the motion more rigid.
</li>
</ul>
<br><p>Related:
<a href="gethingelimitbiasfactor.html">GetHingeLimitBiasFactor</a>
<a href="gethingelimitrelaxationfactor.html">GetHingeLimitRelaxationFactor</a>
<a href="gethingelimitsign.html">GetHingeLimitSign</a>
<a href="gethingesolvelimit.html">GetHingeSolveLimit</a>
</p>
<p>
</p>
</body>
</html>