Prevent Static Mesh from clipping

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.

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.

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)

    # 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 ]){}