# How can I get the half Height of the other actor's(or pawn) capsule collision?

**URL:** <https://forums.unrealengine.com/t/how-can-i-get-the-half-height-of-the-other-actors-or-pawn-capsule-collision/436358>\
**Category:** World Creation\
**Tags:** capsule-component, unreal-engine, Collision, question\
**Created:** [October 25, 2018, 6:16pm UTC](https://forums.unrealengine.com/t/how-can-i-get-the-half-height-of-the-other-actors-or-pawn-capsule-collision/436358 "2018-10-25T18:16:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_12df5922](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_12df5922](https://forums.unrealengine.com/u/anonymous_user_12df5922)\
**Post date:** [October 25, 2018, 6:16pm UTC](https://forums.unrealengine.com/t/how-can-i-get-the-half-height-of-the-other-actors-or-pawn-capsule-collision/436358/1 "2018-10-25T18:16:56Z")

</div>

I’m making a simple platformer and I want to calculate if the enemy’s head is under the player’s feet.

in order to do that, when I collide with an enemy, I need to get the half Height value of the enemy’s capsule collision.

Is there a way to get this value?

---

<div class="post-metadata">

**Author:** ![PurrPaw](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@PurrPaw](https://forums.unrealengine.com/u/PurrPaw)\
**Post date:** [October 25, 2018, 9:22pm UTC](https://forums.unrealengine.com/t/how-can-i-get-the-half-height-of-the-other-actors-or-pawn-capsule-collision/436358/2 "2018-10-25T21:22:50Z")

</div>

Hello!  
You could try to do the following:

1. Get the bounds of the capsule component.
2. Split the Box extend pin and get the Z value.
3. Divide that value by 2

Example:

 ![257663-capture.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/a/9/ca96d1bd1c0fae79c8e7e88670eebaf9fca43949.png)

Hope this solves your problem! Let me know 🙂

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_12df5922](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_12df5922](https://forums.unrealengine.com/u/anonymous_user_12df5922)\
**Post date:** [October 25, 2018, 10:52pm UTC](https://forums.unrealengine.com/t/how-can-i-get-the-half-height-of-the-other-actors-or-pawn-capsule-collision/436358/3 "2018-10-25T22:52:03Z")

</div>

@PurrPaw. Thank you for the answer.  
I actually found a way to retrieve it.  
1- event hit (other) → getcomponent(capsule component)-\>get half height. This solved the problem.
