ok thanks a lot for the information! Do I have to set also the linear colour to a new param?
It’s not quite clear instead of what nodes this above comes? For every event that I will trigger?
Ok nice. I think maybe there is a problem with detecting when the actor is clicked (and selected so to speak) I use only the left controller and all my buttons are set to other functions (grabbing and moving the camera in the world with trigger and teleporting with the thumbsticks and left grip for showing the widget)
I have set the trigger also to left MB, but it destoys my other move possibilities of the camera.
I use a left controller with a laserbeam, with hover over actors it works, but not detecting a hit I guess?
This is fine. How’s the rest?
Antoher question: I set up my actors like in the screenshot. The static mesh consists of 3 material elements. I set the NewMaterial to the element 1 (which colour I want to change)
I see this colour in the viewport, but do I also have to set the element index to 1 in the Create dynamic material instance in the construction script?
My 8 BP actors containing each a different static mesh. It is an other situation then in your example project. Does that make a difference?
My Selected Actor node I selected the first actor in row (Actor1 BP) the others are numbered Actor2, Actor3 and so on. Is that the correct way then?
Hereby the screenshot of the BP, actors and material.
The class of the FALK_TR series BP is staticMeshActor.
The material on the static mesh in element-1 is sometimes material Instance dynamic 2 and at some BP actors 1.
I changed selected object to selected actor, but did all the nodes in that selected actor.
I will try also or there is also maybe a problem with the selection of the actor in VR with the controller.
I think there is also a problem with.
My 8 BP actors containing each a
different static mesh.
It’s fine, for as long as it’s the same Element Index in every static mesh.
My Selected Actor node I selected the
first actor in row (Actor1 BP) the
others are numbered Actor2, Actor3 and
so on. Is that the correct way then?
No sure what that means. You select them by clicking (gripping) them. They’re names / locations are irrelevant. Are you sure you have the right parameter names in the material?
- could post a screenshot of the script in the LB - the one with widget bind and so on
- and the material
- are those actors of the same class, what I posted relies on casting so they’d need to be of the same class
I think you have a major snafu there - you’re using 2 different variables: Selected Object vs Selected Actor. Is this intentional, as that would break things.
You could also try to be more explicit about which material we mean by setting the parameter like so:
Maybe I am to noob for this, but how do I set this up? Just in the actor BP?
And connect it to Construction script? And how do I set up the nodes Selected Actor → MDI → target SetVector Parameter Value?
And stays all the same widget, material and LB the same?
Thanks for the comments. The nodes were connected, but I was working on it, so at time of the screenshot they weren’t there…
Where do I have to set the material param? What is MID node? Is it MDI variable?
And I don’t see the script that shows the the colourBP anywhere. And Try setting the material param like so:
Less ambiguous.
I meant DMI, it’s the same thing, it’s the very first screenshot I posted - the reference of the dynamic material. Since you have many materials on the same mesh, it’s safer to do it this way.
Just in the actor BP? And connect it
to Construction script?
Yes, this goes into the actor whose material you’ll want to alter run-time. Each instance of the actor will then create its own Dynamic Material Instance and assign it to its own Static Mesh Component.
And how do I set up the nodes Selected
Actor → MDI → target SetVector
Parameter Value?
Once you’ve done what’s show in the image 1 (the very first), you can:
Do note that Selected Object type must the same as the actors in the level whose materials we’re changing via the DMI.
This variable would need to be the same type as FALK_TR as this is what we’re testing against with a Cast.
Sorry about the naming conventions:
- Selected Actor = Selected Object
- DMI = MDI
shakes fist at Epic’s HQ and yells at clouds
Thanks again for the quick reply!
It confuses me a bit, when you said: Once you’ve done what’s show in the image 1 (the very first), you can… So do I have both node-sets to be made? The first one in this post and that you just send?
The variable type of your project (Selected Object) is actor, mine is static mesh, is that a problem?
Yes this above is the LB.
And no, Left grip didn’t print a string while try to select the FALK-TR actor.
I have 8 FALK-TR actor BP in my level, numbered from FALK-TR1 to FALK-TR8
I don’t use as far as I know and can see the Left grip button of my controller elsewhere in BP’s in this project.
What I was afraid of, is in my opinion the fact that no selecting in
VR of the actor is happening…
- so a print string after Grip does not print, right?
- the script above is in the LB?
- do you use this input anywhere else, in any other blueprint apart from the LB?
- regarding FALK_TR1 - do you have more than one FALK_TR class in the Content Browser since this one has 1 in the name…