# How to prevent hitscan guns linetrace from hitting the minimap volume trigger?

**URL:** <https://forums.unrealengine.com/t/how-to-prevent-hitscan-guns-linetrace-from-hitting-the-minimap-volume-trigger/1493520>\
**Category:** Blueprint\
**Tags:** linetrace, unreal-engine, Blueprint, question\
**Created:** [December 6, 2023, 8:42am UTC](https://forums.unrealengine.com/t/how-to-prevent-hitscan-guns-linetrace-from-hitting-the-minimap-volume-trigger/1493520 "2023-12-06T08:42:42Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![DiliupG](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/diliupg/32/1071099_2.png) [@DiliupG](https://forums.unrealengine.com/u/DiliupG)\
**Post date:** [December 6, 2023, 8:42am UTC](https://forums.unrealengine.com/t/how-to-prevent-hitscan-guns-linetrace-from-hitting-the-minimap-volume-trigger/1493520/1 "2023-12-06T08:42:42Z")

</div>

Several of my guns use line trace. When I shoot these guns, the line trace hits the Minimap Volume Trigger, which detects the player and NPCs in the world. I am using LinetraceForObjects. If I remove the minimap, everything works fine. How do I prevent the line trace from hitting the minimap or the Minimap volume trigger? I know I have to setup a custom collision channel, but I don’t know the process of doing it. Please help me with a clear explanation.

---

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [December 6, 2023, 8:50am UTC](https://forums.unrealengine.com/t/how-to-prevent-hitscan-guns-linetrace-from-hitting-the-minimap-volume-trigger/1493520/2 "2023-12-06T08:50:30Z")

</div>

If the minimap volume inherits from unreal’s base AVolume class then you could try selecting the minimap volume =\> going into it’s collision component and setting the trace segment to ignore. If the minimap has a custom trace channel then you need your weapons to ignore that specific channel on trace.

In the worse case scenario you can create a custom trace channel and trace the weapons only against this newly created channel.

---

<div class="post-metadata">

**Author:** ![DiliupG](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/diliupg/32/1071099_2.png) [@DiliupG](https://forums.unrealengine.com/u/DiliupG)\
**Post date:** [December 6, 2023, 9:41am UTC](https://forums.unrealengine.com/t/how-to-prevent-hitscan-guns-linetrace-from-hitting-the-minimap-volume-trigger/1493520/3 "2023-12-06T09:41:56Z")

</div>

The Minimap is of the Actor class type. The volume trigger is a child of the BP\_minimap.  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/d/1/dd13a4c9744c0af291f8ddf7383dbe110d943344.png)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/9/0/b905c611633b350843fa24df8e4c4ed3cfc1769b.png)  
This is the collision setup for the overlap trigger.  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/a/7/ca7e9a42ccd592111efb20bd1e920ee871d554a6.png)  
This is the gun line trace. Though I set up actors to ignore it does not work.  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/0/2/70230183011d9c1606e1bb0e1adc61d3738e8fd4.jpeg)  
You can see the collision of the gun line trace in the top left corner. Can you please help me set this up? I don’t understand how to setup the Collision channel, etc.

---

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [December 6, 2023, 10:19am UTC](https://forums.unrealengine.com/t/how-to-prevent-hitscan-guns-linetrace-from-hitting-the-minimap-volume-trigger/1493520/4 "2023-12-06T10:19:01Z")

</div>

Looking at the trace I noticed you are tracing by object and not trace channel so you need an object channel

 ![Wchannel](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/f/1/df1f224e2f2924fbb40a80ac54cc61a415f1a9f7.png)

 ![traceSkip](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/b/1/7b1f02bc18dcafa03f7f01888f77881a618e0b7a.jpeg)

---

<div class="post-metadata">

**Author:** ![DiliupG](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/diliupg/32/1071099_2.png) [@DiliupG](https://forums.unrealengine.com/u/DiliupG)\
**Post date:** [December 6, 2023, 2:07pm UTC](https://forums.unrealengine.com/t/how-to-prevent-hitscan-guns-linetrace-from-hitting-the-minimap-volume-trigger/1493520/5 "2023-12-06T14:07:02Z")

</div>

The Minimap volume Trigger is also constantly checking the Player and NPCs positions to update on the minimap. This method won’t disrupt that?

---

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [December 6, 2023, 2:10pm UTC](https://forums.unrealengine.com/t/how-to-prevent-hitscan-guns-linetrace-from-hitting-the-minimap-volume-trigger/1493520/6 "2023-12-06T14:10:05Z")

</div>

It shouldn’t. You are only changing the category in how the minimap is identified for object traces and as you don’t plan on reporting line traces on it, it should be safe.

---

<div class="post-metadata">

**Author:** ![DiliupG](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/diliupg/32/1071099_2.png) [@DiliupG](https://forums.unrealengine.com/u/DiliupG)\
**Post date:** [December 6, 2023, 2:48pm UTC](https://forums.unrealengine.com/t/how-to-prevent-hitscan-guns-linetrace-from-hitting-the-minimap-volume-trigger/1493520/7 "2023-12-06T14:48:53Z")

</div>

I tried your method and then the linetrace did not detect the collision box but detected everything else in the world but the Minimap disappeared! I changed the linetrace method to LineTraceByChannel

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/3/8/5381f9bde63eec59e33dfcf584dd2d447afe1f60.png)  
with the settings like this and now everything works fine Minimap and all! Thank you very much for your valuable time for helping another person. It’s people like you that make the world a good place. May you be well!

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [January 5, 2024, 2:49pm UTC](https://forums.unrealengine.com/t/how-to-prevent-hitscan-guns-linetrace-from-hitting-the-minimap-volume-trigger/1493520/8 "2024-01-05T14:49:21Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
