# Line trace an opacity mask

**URL:** <https://forums.unrealengine.com/t/line-trace-an-opacity-mask/397730>\
**Category:** Blueprint\
**Tags:** line-trace, opacity-mask, unreal-engine, Blueprint, question\
**Created:** [July 21, 2017, 3:54pm UTC](https://forums.unrealengine.com/t/line-trace-an-opacity-mask/397730 "2017-07-21T15:54:34Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![redbox](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@redbox](https://forums.unrealengine.com/u/redbox)\
**Post date:** [July 22, 2017, 5:30pm UTC](https://forums.unrealengine.com/t/line-trace-an-opacity-mask/397730/4 "2017-07-22T17:30:11Z")

</div>

UE3 had a feature called “Physical Material Mask”, that allows you to set black/white texture and apply 2 physical materials to surface. In UE4 its still in backlog, but maybe you can develop it on your own.

[https://docs.unrealengine.com/udk/Three/PhysicalMaterialMask.html](https://docs.unrealengine.com/udk/Three/PhysicalMaterialMask.html)

One more option is to detect color of hit surface by getting it from color buffer. So the invisible part of image will be filled with solid color, like (0.5,0.5,0.5), and you will ignore line trace when it hit.

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — ue4community.wiki! You will be able to find content from the official...

---

_[View the full topic](https://forums.unrealengine.com/t/line-trace-an-opacity-mask/397730)._
