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 to prevent 3D widget that are drawn on Screen space from overlapping? (Speech Bubble)

In a top-down perspective, a character can have one speech bubble spawn near them. If there are multiple characters that are close to each other their speech bubbles that are drawn on screen space might overlap each other. So, to prevent that from happening, is there any viable method or approaches. For instance, I had searched about how to check if Widgets are overlapping but to no avail. Other than that, I think the biggest problem is to calculate a new position for the widgets if they are overlapped.

Product Version: UE 4.20
Tags:
more ▼

asked Apr 18 '19 at 02:08 PM in Using UE4

avatar image

Darkcresc
1 1

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

1 answer: sort voted first

There's no built-in method for this, you will need to do it manually. Get the size and position of each widget and mathematically figure out where others can be placed.

You did not include much details here but if it needs dynamic updates (widgets size changes on the fly or the speech bubbles move about a lot) you'll need to do it during tick.

Could you quickly demonstrate a potential layout on the screen - a crude paint drawing will do! I'm wondering if there's an automated method of doing it what you need.

more ▼

answered Apr 18 '19 at 08:37 PM

avatar image

Everynone
13.7k 74 25 57

avatar image Darkcresc Apr 19 '19 at 12:56 AM

Here what I am able to achieve. I get the average location between all actor that talks. When an actor talks, I first find a direction from the average location to the actor's self-location. Using that direction, I add a certain amount of distance as the offset. This method kind of work when all actors that talk are in different directions. alt text alt text Here is the issue when some actors are in the same direction. alt text

I do think about the issue of how to get the size of the widget, the widgets are all dynamically spawned with the desired length. I also know that getting the desired draw size cant work as I had tested it myself and read it on another post in here. Not sure if there is another proper way of getting it. The bubble doesn't need to update dynamically, just that it had a different length based on the content.

(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