I want to change the crosshair (not the mouse cursor) (using the hud from the unreal first person template), so if i mouse over an item, it should change (to a for example a pick up hand). When i exit, it comes to normal crosshair (a white point).
I know this should be simple… but i just cant do it.
Anyone can help me, give me advice or send me al link to a tutorial, please?
Yes its easy…
you need to do it with line trace node in tick… check for trace collisions and switch crosshair to hand when you hit actor with trace. i think create new trace collision channel for this…
I can understand what you say, but after trying i cant do it.
Do you know about a tutorial or something wich can lead me please¿?
I already made a system (with linetrace) for other thing (on click it open doors and such); the part i am missing is … that i cant make the crosshair change; i dont know how o_0
you can try to do it in widget, use “widget switcher” box… it has indexes depending on how many childs it have…
so first , put into switcher “crosshair”
and as second put into switcher “hand” picture or whatever you want…
On beginplay just add this widget to your viewport (from controller for example) and pass info to it in tick (0 or 1 to switcher) depending what you targeting…
try to play with that widget switcher, i think its the best thing to make what you want
Anyway, i think i dont have enough knowledge for doing this. Im trying to search for tutos about this, with no luck.
Tons of games make this, change crosshir on events. But it seems its harder than it seems, or too easy to make a tutorial.
Ill keep trying, and thinking about your advices; but i think i need a step-step tutorial; i need to understand how its working.
A little upset with UE as i cant find tutos for the little things.
already 2 days trying it… i have seen tons of tutos… from Unreal ones to the tesla guy…
Its hard sometimes for me, as my English is soo bad! Im learning it too; its a beautiful language.
Im going to watch the video right now, and try to understand it and make something with it.
Ill tell you something later.
Meanwhile… a big THANK YOU (amazed to see that someone took the time to make that for me).
So really; thank you
I just learned to create a collision preset in the proyect settings.
Created one “TRACE CHANNEL” called “crosshair_mio” and made it “block”
Now i can select it in my objects.
I just learned to create a collision preset in the proyect settings.
Created one “TRACE CHANNEL” called “crosshair_mio” and made it “block”
Now i can select it in my objects.
Still, i cant see my crosshair
[/QUOTE]
As default make that trace channel ignore because it will show you hand on everything… and then set trace collision to block to only actors/meshes where you want to show hand… i dont have any other ideas
When i changed it to ignore by default, i found my error.
As it was to block all, it was using the second crosshair texture all the time; wich is a bad one, maybe because its png but its not showing up.
And then i was thinking the general thing was not working.
But the first crosshair texture is working!
Tomorrow ill test this more extensively.
Thank you again. i have learn a lot trying to understand your graphics.
This is one of these moments when i dont know how to express how much grateful i am.