I can add the events related to the mesh in question, but they never fire. Is there a reason that could prevent them from triggering in the actor component? Is there a work around?
Any help appreciated
I can add the events related to the mesh in question, but they never fire. Is there a reason that could prevent them from triggering in the actor component? Is there a work around?
Any help appreciated
It is just a normal plane. If I print string the name of the mesh every tick : it prints whatever name I put in the blueprint.
I can use what I did in Test_Hover in the main blueprint and everything works perfectly, but if I want just an actor component that does the same it doesn’t.
I don’t know if that is the use of the actor component, but if it’s not, do you know what would be?
Without really having a good idea what your setup and use case is, I can just make some general guesses what’s going on.
It could be the classic “bullet collision problem.” Child components are next in line for collisions after the parent, so if you have a bullet that hits the character and you want it to detect what body part it hit, it won’t initially work because the main capsule is blocking its collision. You need to set it up to have its own custom collision channel, one that the parent ignores, but the child will collide with. I think this is a version of that.
I don’t know if there’s a way to change collision channels for mouseover effects, but there may be a workaround. When the parent detects a mouseover event, you could fire a trace from the cursor’s position projected into screenspace onto the character. And from that, you could use the “bullet trick” to bypass the main capsule’s collision and find out which bone you’re hitting, and based on that you could get which mesh is being impacted.
Of course, I’m assuming a lot about how your blueprint is set up, but think that’s the gist of what you’re trying to accomplish?
I indeed forgot to explain what I was trying to accomplish : right now I am only trying to change the color of a plane when I hover over the plane with the cursor. The following blueprint does exacly that.
However, if I want to have multiple of these color changing plane in the same blueprint it is a pain to make the exact same connections for each of the plane. So I was thinking of making a separate thing to manage these connections so I would only need 2 connections per color changing object instead of 8.
I thought about making a blueprint for the color changing plane, and just pasting them into the main blueprint, but I don’t believe it is possible.
The “bullet trick” seems like a bit of an overkill to be using instead of the On Begin Cursor Over event (I could be wrong though).
You can use ActorBeginCursorOver as trigger event, and connect every static mesh to the target pin, without casting (as long as they are mesh components)
Yeah, the 1 is the normal behaviour, if you want to get the result in the 2 you only have to connect the background plane to the SetScalarParameter node, but it will work even if you hover another plane
That’s exacly the problem : I want to make it so, when I hover 1 plane it changes color, but doesn’t change the rest and when I exit it goes back to the original color.
I can connect the event On Begin Cursor Over (testWall) to the mesh of itself like I did previously, but that would require that I do those connections for every single plane. That’s exacly why I want to know if there is a way to make it “modular”. I connect 1 component to 1 actor component and it manages the hover. (I know it’s not that big of a deal, but the fact that it doesn’t work is what’s made me ask the question)
I believe that the Test Hover (actor component) that I showed in the original question would do exacly that, except for the fact that the actions (which trigger correctly in the main blueprint) don’t trigger correctly in the actor component.
This is exactly what I was looking for!
Thank you so much!