# How do you get a custom FCollisionShape from a static mesh or other Geometry

**URL:** <https://forums.unrealengine.com/t/how-do-you-get-a-custom-fcollisionshape-from-a-static-mesh-or-other-geometry/2000320>\
**Category:** C++\
**Tags:** unreal-engine, CPP, question\
**Created:** [September 1, 2024, 1:04am UTC](https://forums.unrealengine.com/t/how-do-you-get-a-custom-fcollisionshape-from-a-static-mesh-or-other-geometry/2000320 "2024-09-01T01:04:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kaiju\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kaiju\_1](https://forums.unrealengine.com/u/Kaiju_1)\
**Post date:** [September 1, 2024, 1:04am UTC](https://forums.unrealengine.com/t/how-do-you-get-a-custom-fcollisionshape-from-a-static-mesh-or-other-geometry/2000320/1 "2024-09-01T01:04:38Z")

</div>

I am trying to convert a UStaticMesh into an FCollisionShape for use in a SweepSingleByProfile()

the static mesh is a quarter of a cylinder

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/3/283651211322b89eb7f013e3f2df0fd3d56fe683.jpeg)

I have the Mesh defined as simply  
`UPROPERTY(EditDefaultsOnly) UStaticMesh* ScanMesh;`

one source indicates that get collision shape can be used, but I am not able to find any such function in the documentation for a static mesh, only for some simple geometries. Casting did not work either.  
: [Why does SweepSingleByChannel not work with a Box?](https://forums.unrealengine.com/t/why-does-sweepsinglebychannel-not-work-with-a-box/393240)
