x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Display enemy healthbar oriented towards viewing player with occlusion

With healthbar there are 2 major options, screenspace or worldspace. Both have a problem:

Screenspace: Occluding the healthbar based on terrain and such is problematic/hacky, requires some way of finding all the the healthbars/owners of healthbars, checking LoS manually, and then enabling/disabling the element based on this. We did this, but the LoS check is overly simplistic, and only checks for the center of the actor. Thus with 2 enemies one in front of the other, you'll usually only see 1 healthbar, even if they're offset enough that you'd expect to.

Worldspace: Healthbar isn't oriented towards player viewing it (rotates with the actor it is placed upon). There's a hacky solution to this where you just rotate towards the LookAt for GetPlayerController(0), but this has issues with splitscreen/multiplayer, and just generally seems like a hack.

Wondering if there's a neat solution to this with either screenspace option.

Product Version: UE 4.20
Tags:
more ▼

asked Feb 06 '19 at 05:35 PM in Using UE4

avatar image

narthur157
6 1 2

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

A material-based solution is probably what you need. That way each camera can correct the objects facing in world space. At the bottom of this link is an example that is done for foliage cards in the distance.

https://docs.unrealengine.com/en-us/Resources/Showcases/Stylized/Materials

more ▼

answered Feb 06 '19 at 05:55 PM

avatar image

dachora1
269 4 9 12

avatar image narthur157 Feb 07 '19 at 07:22 PM

I tried to use the Face camera on 1 axis thing, and it sort of worked, but I wasn't able to display the "progress" on the health anymore. Seems to be related to the 2 sided issues with UMG in 3d

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question