Hey All, I’ve just purchased the Realistic Blueprint Weapons from the marketplace and I added in all my functions and such to the character in the pack. All is well!
…Apart from one thing…
The crosshair is obviously attached to the center of the screen so the bullets actually go way off the crosshair (I know i know, my character is over to the left of the screen so this will affect it, but thats the camera style im going for)…
Is there anyway i could get a cross hair that would follow the muzzle socket of the Rifle? I think that would be the best solution.
Here is a few pics in one displaying my crosshair in the HUD and my characters terrible shooting skills xD
Ray cast from the socket out until the first hit (use collision channel to make sure you only hit things you want to hit), then convert to screen coordinates and draw your crosshairs at that spot?
Third person is a tricky one. Making the reticle move around may make it hard to play.
Sorry, I’m still really new to blueprints so a lot of that was like a different language to me lol
I did actually find a tutorial to add a different crosshair, one which used to mouse as a crosshair and the character follow… which ended up even worse than before.
But yeah, it does seem a lot trickier than keeping it first person… but what im going for is the Gears of War style camera set up. Where the character is offset into the left hand side, and even more when zooming in etc… I’ve already got the camera system set up for that >.<…
Anyway, If you know of any tutorial that could teach me this sort of thing I would greatly appreciate it. I’ve been searched for probably 8+ hours for a solution now, trying things out myself and im slowly losing steam
Here’s all the different approaches I’ve taken on this so far…
Moving the interface crosshair from the center of the screen (to which it works for long range, but still up close its way off)
Moving the socket that the projectile comes from over to the right
Rotating the Sock that the projectile comes from
Rotating the character
Rotating the camera slightly
None of this has helped.
I think the one thing that I could do is, Make an crosshair that would float infront of the character that’s clamped to the center of the screen (if this is even possible)… then as I come up to about 6-10 foot away, slow move in the crosshair to the left by up to about a foot.
If I could do that, I think this would resolve this issue.
Anyway, I need to sleep. Hope someone can help!
Thanks.
Hello,
I haven’t try yet but i’ll try two things for my muzzle start line trace : Use the impact point of the line trace or the end point when return value is false and draw there. Use a second line trace same as first one with a short range and draw there. The first one sounds better for precision but classic draw will reduce size. I maybe will try to set a widget with screen selected and see if it does the trick. Not sure i’ll have time today but if i have i’ll come back and say.
I’ve already tried that unit. But when I move closer to an object the crosshair should follow rather than just stay on the middle, which it doesn’t follow it. I have no idea how to set it so it does.
Thanks fen. I’ve had the idea of having the crosshair somehow linked to the hit location of the line trace from my muzzle then displaying the crosshair in screen space, but again. No clue how to lol I have tried though!
Cheers
I’ve got a template which I found on a Youtube video somebody was kind enough to share
(https://www.youtube.com/watch?v=6Pt8WJ9O-kU).
This has what i want,
Whether i move the camera to the left or back of the character, or if I’m close or far to an object and fire, The projectiles always go to the crosshair without the crosshair having to move on the screen.
Only problem is, the template was half made with c++ so, i have no clue how i could incorperate it into my character >.< lol…
Did you try to add a component widget set to screen in character and set its world location to the Impact point / End of linetrace on tick (i use a var to set the vector) It is not bad as long as your camera is not on your character. (i had to remove its collision too)
Thats what I’m struggling with, I dont know how to set the location of it to the end of linetrace. I’ll be on later to try a few things, but for now i have to go to work
If you have any information or a link to a tutorial on how to do this, that would be awesome. Sorry, im trying to learn but i think im trying to run before i can walk lol
Cheers.
Here is what i did : A line trace from muzzle socket using camera which i output Hit loc (impact point or last location of the line trace) used for fire and crosshair.
I add a widget in character (ui / space set to screen and rot 90.0.90) and i used the crosshair from Osman for it : [FREE ASSET] Dynamic UMG crosshair. - Community Content, Tools and Tutorials - Unreal Engine Forums <— really cool gift !!! ^^
At first i had a weird effect (widget was coming back to muzzle) but i tried with a static mesh, it worked and when i did it again with widget it worked fine (in case of it happens to you ^^). You need to custom your projectile collision too by ignoring camera to not have crosshair reacting when you shoot.
Thank you so much for the help, much appreciate it! I will test this out when I finish work! Just hope I can make it work with realistic blueprint weapons or ill have to start from scratch anyway…
I’ve just wrote up part of my concept for my game today and I’m really excited about it after weeks of debating what to do … Just need to think if I can do it alone, and how much that might cost with buying in customs models and such xD!
Anyway, until later! Thanks again
You can just make a crosshair in Photoshop, and then import it as a texture, and draw that texture onto the screen in your HUD class, but please do not bump/reply to posts this old.
This works great, except when my character is moving and aiming. Any ideas on how I can prevent the crosshair from wiggling around when my character is moving?
This post is pretty old and I’m sure you are not working on your project anymore, but just in Case you are still working on it or someone else with the same problem reads this: Before you update your Crosshairs location, check if the Velocity is equal to 0 (MovementComponent -> Get velocity -> vector length -> == 0 (Bool) ). If you want your character to aim while walking you may want to create a Variable called “IsAiming” which is true while your Character is either standing or moving+aiming.