Cursor collision?

Instead of makeing a line trace for my cursor every tick or second etc, could i make a trigger with collision for an object if my mouse cursor is hovered, clicked or anything else?`

If so how? I tried “On Click” and “On begin cursor over” but none of them seems to be working with the cursor

Anyone? <3

If you want to put interaction in your game, a line trace is by far the best method.

All that cursor won’t work unless the mouse cursor is visible, which looks ■■■■. Much better to use a line trace.

You only need to do the trace when the player clicks.

Tried that, and it worked great but… I have a gizmo transformer at runtime. Other objects may be blocking the gizmo so i can’t click on it just by a single line trace, i also have some other issues but in order for them to get fixed i came up with something.

Thats why i would love to know, if there was a way to detect if the mouse was hovered on a object.`

But i might be taking a wrong/harder way, so if there is any other ways like making my gizmo first order in the render so even if there is like 10 objects in front of it i would still be able to click?

If i try to explain it better here

For a better siluation that would fix everything else as well.

  • Is there a way to make my special object be rendered in front of other objects even if there is like 10 objects in front of it, also just dont want it to be showen thru the other objects, but also able to be clicked on even if there is more objects in front of it.

  • So with other words, my special object should be rendered on top of anything else and have first priority if i click on it

Yeah, just like the UE gizmo, right?

exactly

Possibly with a post process volume ( gimme a bit… )

1 Like

Something like this possibly

I will give it a try and let you know :slight_smile:
Thanks

So just tried it, but doesn’t seem to be rendering at all. I checked 3 times and everything is like the tutorial.

Anyway… Before i go into more details and try to make more material like this. Would it even fix the problem for the click prioirty as well? - I can easily get the rendering/visual to appear infront of other object by making the “Disable Depth Test” True. Only problem with that is that doesn’t solve my click priority problem…

Man i am lost with this, i have been trying for days now and there is very little information on the internet
Would appricate any other solution

Ah, no, it’s not gonna fix the click depth test.

Are you much of a C++ buff? It might be an idea to have a rummage in the engine and see how Epic did it.