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"

how do i make a health bar (above characters head) always look at the camera

So im following this tutorial here for making a health bar above a players head. Im trying to set up a basic tower defense game, where my camera has a top down view of the map, (meaning, its not attached to the player anymore so half of this tutorial does not help my situation). I almost have this working, but i cant figure out exactly how to line up the rotation of the health bar to look at my camera. here is my blueprint alt text

and here is what the viewport of my game is currently looking like

alt text

As you can see, the rotation of the health bars is not lining up correctly. Can somebody please point me in the right direction of how i can accomplish this? any help would be greatly appreciated.

Product Version: UE 4.8
Tags:
more ▼

asked Aug 18 '15 at 12:02 AM in Using UE4

avatar image

ViceVersa
1k 64 47 98

avatar image ViceVersa Aug 18 '15 at 10:52 AM

so instead of the rotation looking at the camera, i figured it would be easier to have the widgets rotation always stationary(going side to side like the character in the bottom as opposed to the one on the right). i set the yaw rotation to always be 90 which fixed the issue for this particular instance, however, if i wanted to rotate my camera around, this would defiantely cause issues so if anybody knows how to fix this, please let me know. Thanks!

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Instead of GetPlayerController -> GetActorLocation try GetplayerController -> cast to ThirdPersonCharacter (if it's the type of pawn of your players) -> get FollowCamera -> GetWorldLocation

NameDisplay - the object wich need to be rotated from the other player (of corse it needs to be retargeted)

alt text

ue4.png (146.9 kB)
more ▼

answered Mar 24 '16 at 08:32 PM

avatar image

Unicornslayer
51 1 2 4

avatar image Demonrras Nov 14 '18 at 02:36 PM

How I can to fix this problem on my nameplate when camera go to top of character like image above? alt text

alt text

1.png (344.0 kB)
2.png (4.2 MB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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