# Change Color of Points in Point Cloud

**URL:** <https://forums.unrealengine.com/t/change-color-of-points-in-point-cloud/1534100>\
**Category:** Blueprint\
**Tags:** unreal-engine, point-cloud, question\
**Created:** [December 17, 2023, 9:44pm UTC](https://forums.unrealengine.com/t/change-color-of-points-in-point-cloud/1534100 "2023-12-17T21:44:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mamls123](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mamls123](https://forums.unrealengine.com/u/mamls123)\
**Post date:** [December 17, 2023, 9:44pm UTC](https://forums.unrealengine.com/t/change-color-of-points-in-point-cloud/1534100/1 "2023-12-17T21:44:37Z")

</div>

I want to change the color of individual points in my point cloud based on where I am aiming.  
For this I followed this tutorial for line tracing:

> **[Using a Single Line Trace (Raycast) by Channel](https://docs.unrealengine.com/4.27/en-US/InteractiveExperiences/Tracing/HowTo/SingleLineTraceByChannel/)**
>
> This how-to guide covers using a Single Line Trace by Channel Blueprint node to return the first Actor it hits that responds on the Visibility channel, and prints its name.

The line tracing part works fine, but no color change is happening.

Here is my current Blueprint.

 ![Screenshot 2023-12-17 182436](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/d/0/fd0b744e76f086719def83b072c7eb84383d0d91.png)

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![mamls123](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mamls123](https://forums.unrealengine.com/u/mamls123)\
**Post date:** [December 19, 2023, 9:12am UTC](https://forums.unrealengine.com/t/change-color-of-points-in-point-cloud/1534100/2 "2023-12-19T09:12:28Z")

</div>

To answer one issue I solved so far, I had to build collision of the point cloud. Now a LineTraceByChannel recognizes the hit event between ray and point cloud.

One Issue that is still remaining is that the location of color change does not equal the Ray that is drawn by LineTraceByChannel. Maybe there is something wrong with my get world location or rotation?

This is my updated Blueprint:

 ![Screenshot 2023-12-19 101106](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/a/e/1ae81bbb6295086e5ea49ff9c10fabc2860d6798.png)

---

<div class="post-metadata">

**Author:** ![mamls123](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mamls123](https://forums.unrealengine.com/u/mamls123)\
**Post date:** [December 20, 2023, 12:30pm UTC](https://forums.unrealengine.com/t/change-color-of-points-in-point-cloud/1534100/3 "2023-12-20T12:30:02Z")

</div>

I managed to do it.  
I fed the wrong vectors into ApplyColorToFirstPointByRay.  
Here is my final Blueprint.

 ![Screenshot 2023-12-20 132942](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/c/9/6c93e474471644b03e703359f3bb4684d60ff6a1.png)

---

<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 19, 2024, 12:30pm UTC](https://forums.unrealengine.com/t/change-color-of-points-in-point-cloud/1534100/4 "2024-01-19T12:30:40Z")

</div>

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