As of right now, I can’t upload the image to display in the Thread. So here is a Link : Here
Is the reticle being rendered as a UI sprite that translates its position from Worldspace (of the locked target) to Screenspace on the Viewport?
If so, how would I go about doing so?
Or are they using some other form of method to do so?
Appreciate the feedback in advance!
You can actually just add a Widget Component to your enemies and set it to Screen mode instead of World mode. That will automatically translate its position in the world into screen position, and it’s a lot easier to place it exactly where you want on the enemy if it’s a component. It’s the same method you’d use for something like a health bar.
The only problem is if you’re in front of the enemy, the widget will appear on top of your player because it’s on top of the entire screen. It doesn’t seem like a big issue, but one way to fix that might be to regularly do a line trace from your camera to the current enemy’s widget component, and if the trace collides with your player, then hide the widget. Logically that makes sense to me but I’ve never tried something like that so I don’t know if it would actually work well.
Everynone: I’ve successfully used the [Project World to Screen] Node in order to draw the reticle on the UI and have it update the position every frame. The only thing that is hard with this is actually getting the reticle to remain in the accurate position when rotating around the target. I’ve tried to add offset but it’s still not being very accurate.
[video]https://drive.google.com/open?id=0B9jTFeCFXVKzU0I2VGhnQ0h6YWM[/video]
JParent: This method seems like I’ll be able to actually get more of a precise location for the reticle this way. I’ll try to work with this method and see if this works out for the better.
I’ll share my results after testing it. Hopefully it works!
Eureka!!! I successfully got it to work! @JParent Unfortunately I wasn’t able to render the reticle on the screen with the [Add Widget Component] to the enemy. It worked with adding it to World but I that wasn’t quite what I’m looking for. @Everynone The only thing I was missing was to figure out how to get the bone location of the target (since the [ConvertWorldLocationToScreenPosition] in the playerBP couldn’t reference the bone data of the target directly. Needless to say I figured out a workaround that works flawlessly.
Thanks so much for the help guys, I really, really appreciate it!
//Forums is being finicky so I can’t upload any footage at the moment.