# Prevent Static Mesh from clipping

**URL:** <https://forums.unrealengine.com/t/prevent-static-mesh-from-clipping/1667257>\
**Category:** Verse\
**Tags:** unreal-editor-for-fortnite, fortnite-creative, question, fortnite\
**Created:** [February 5, 2024, 5:58am UTC](https://forums.unrealengine.com/t/prevent-static-mesh-from-clipping/1667257 "2024-02-05T05:58:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jag\_firerwalker](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jag\_firerwalker](https://forums.unrealengine.com/u/jag_firerwalker)\
**Post date:** [February 5, 2024, 5:58am UTC](https://forums.unrealengine.com/t/prevent-static-mesh-from-clipping/1667257/1 "2024-02-05T05:58:10Z")

</div>

I have a Signal Remote that allows me to place a static mesh. Unfortunately, I can’t figure out how I can prevent it from clipping into other objects. I already created a collision mesh, but that doesn’t seem to do anything.

---

<div class="post-metadata">

**Author:** ![Astrotronic](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/astrotronic/32/1194566_2.png) [@Astrotronic](https://forums.unrealengine.com/u/Astrotronic)\
**Post date:** [February 6, 2024, 5:10pm UTC](https://forums.unrealengine.com/t/prevent-static-mesh-from-clipping/1667257/2 "2024-02-06T17:10:36Z")

</div>

Hi Jag,

How does the system for placing meshes with a Signal Remote work?

To prevent clipping: I’m imagining a sort of system that knows how large the mesh is, and before allowing you to place it shoots raycasts out, and if the raycasts hit within a certain distance, it does not allow placement of the mesh.

---

<div class="post-metadata">

**Author:** ![jag\_firerwalker](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jag\_firerwalker](https://forums.unrealengine.com/u/jag_firerwalker)\
**Post date:** [February 7, 2024, 5:18am UTC](https://forums.unrealengine.com/t/prevent-static-mesh-from-clipping/1667257/3 "2024-02-07T05:18:15Z")

</div>

Oh that is a good idea. I have seen people talking about this in dev logs before, but never seen how to build on - especially not in UEFN Verse.  
This is my object placement function, which is gets triggered when: `RemoteControl.PrimarySignalEvent.Subscribe(PlaceBomb)`

```auto
    # Keep the devices at player location at all times
    PlaceBomb(Agent : agent): void=
        # when pressing the Signal Remort, spawn the DeviceMover at the player location
        if:
            FortCharacter := Agent.GetFortCharacter[]
        then:
            # Place bomb when looking LEFT -- ensure that the bomb faces the player
            if(XPos := Floor[CurrentPlayerLocation.X + Spacer] * 1.0 , YPos := Floor[CurrentPlayerLocation.Y + (Spacer + 60.0)] * 1.0, PlayerDirection = "LEFT", XPosInt := Int[XPos / Spacer], YPosInt := Int[YPos / Spacer]):
                GenerateBomb(XPos, YPos, BombAngle := 1.5)
      

            # Place bomb when looking RIGHT -- ensure that the bomb faces the player
            if(XPos := Floor[CurrentPlayerLocation.X - Spacer] * 1.0 , YPos := Floor[CurrentPlayerLocation.Y + Spacer + 60.0] * 1.0, PlayerDirection = "RIGHT", XPosInt := Int[XPos / Spacer], YPosInt := Int[YPos / Spacer]):
                GenerateBomb(XPos, YPos, BombAngle := -1.5)
  

            # Place bomb when looking UP -- ensure that the bomb faces the player
            if(XPos := Floor[CurrentPlayerLocation.X] * 1.0 , YPos := Floor[CurrentPlayerLocation.Y + (Spacer * 2) + 120.0] * 1.0, PlayerDirection = "UP", XPosInt := Int[XPos / Spacer], YPosInt := Int[YPos / Spacer]):
                GenerateBomb(XPos, YPos, BombAngle := 3.2)
   

            # Place bomb when looking DOWN -- ensure that the bomb faces the player
            if(XPos := Floor[CurrentPlayerLocation.X] * 1.0 , YPos := Floor[CurrentPlayerLocation.Y + 60.0] * 1.0, PlayerDirection = "DOWN", XPosInt := Int[XPos / Spacer], YPosInt := Int[YPos / Spacer]):
                GenerateBomb(XPos, YPos, BombAngle := 0.0)
  

    GenerateBomb(XPos : float, YPos : float, BombAngle : float) : void =
        BombPlacer.Reset()

        BombRotation := MakeRotation(Axis := vector3{X := 0.0, Y := 0.0, Z := 1.0}, AngleRadians := BombAngle )

        if(BombPlacer.TeleportTo[vector3{X := XPos, Y := YPos, Z := 100.0}, BombRotation]){}

```
