VR ue4 Setting the material with an interactive laser pointer

Hello!
How can you solve the problem of assigning a specific material using a laser pointer?
I wanted to use the pickup event but can’t get it to work with multiple static meshes. Works only on any one grid. I tried splitting the event with “Toggle by Name” tags but don’t know how to make it work, I’m still new to this. I would appreciate any help!

Hi G.Piren,

I put together a sample project for you.

Fun Features:

The Color Picker BP can control any static mesh. (Color picker is not linked to any specific mesh)

The only place you need to change the color is the sphere. (It automatically grabs current color from sphere and applies it to target mesh)

There are many ways to implement this, but I used the ‘Component Tags’ , a different tag for each sphere. And once the sphere is interacted with, it sends that tag info to BP_ColorPicker.

Hope that helps, let us know how it goes. (Project was created with 5.0, but can be opened in 5.1+)

AJ_ColorPicker.zip (872.8 KB)

1 Like

Hi Astrotronic! Thank you very much for your solution, I will check it today

Hi Astrotronic!
It seems to work well :grinning:
There is another problem, my object (chair) consists of several meshes, how do I make it an array so that the material is applied to all selected meshes like this chair?



I think this can be quite a cumbersome solution if there are many objects with different materials.

Glad to hear that it works well!

For more meshes, It would probably be easier just to create a few extra mesh references.

Although ultimately I think you’ll find that most meshes use material channels. (Single mesh with 1 channel for wood and 1 for cloth)

In your BP_MotionController, you don’t need to cast to each sphere, Just the BP_ColorPicker. (And then it looks at the component you just hit, and passes that to the specific instance of BP_ColorPicker you just hit.)

Thanks a lot!

I’m attempting to modify the texture and color of objects by clicking on a sphere. Initially, I successfully implemented this functionality using the FirstPerson template. However, I’m now encountering issues when attempting to do the same with the VR template. I’m unable to interact with the sphere or trigger the click action. Can someone provide assistance or suggest a solution for this? I’ve attached the blueprints I’ve been working with for reference.