<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Jin</title>
    <description>The latest articles on Forem by Jin (@hyeongjiin).</description>
    <link>https://forem.com/hyeongjiin</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3719251%2Fac5fba9a-38c7-4904-874b-53e922055c78.png</url>
      <title>Forem: Jin</title>
      <link>https://forem.com/hyeongjiin</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/hyeongjiin"/>
    <language>en</language>
    <item>
      <title>Standing Up Collision Check (Crouch Stand)</title>
      <dc:creator>Jin</dc:creator>
      <pubDate>Mon, 19 Jan 2026 09:40:14 +0000</pubDate>
      <link>https://forem.com/hyeongjiin/standing-up-collision-check-crouch-stand-41gn</link>
      <guid>https://forem.com/hyeongjiin/standing-up-collision-check-crouch-stand-41gn</guid>
      <description>&lt;p&gt;Before standing up, Check if there is enough space above the player.&lt;br&gt;
Use Physics.CheckCapsule with the standing height, not the crouching height.&lt;br&gt;
The capsule starts at the player’s bottom position and extends upward to the standing height.&lt;br&gt;
Player and ground layers are excluded from the check.&lt;br&gt;
If the capsule overlaps with any collider, standing up is blocked.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bool CanStandUp()
{
    float radius = characterController.radius;

    // bottom of player
    Vector3 bottom = transform.position + characterController.center - Vector3.up * characterController.height * 0.5f;

    // top of player when standing
    Vector3 top = bottom + Vector3.up * standHeight;

    // for debug
    Debug.DrawLine(bottom, top, Color.red);  

    int layerMask = ~LayerMask.GetMask("Player", "Ground");

    // Check Capsule Collision
    return !Physics.CheckCapsule(
        bottom,
        top,
        radius,
        layerMask,
        QueryTriggerInteraction.Ignore
    );
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>unity3d</category>
      <category>gamedev</category>
    </item>
  </channel>
</rss>
