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"

problem with select multiple actor with rectangle

hi,i want select multiple actor in my strategy game,i use draw rect for graphic ,and "use get actors in selection rectangle"for store actor in draw box.but it select actor outside my box.whats my wrong?alt text

Product Version: UE 4.18
Tags:
sell.jpg (152.1 kB)
more ▼

asked Jan 19 '18 at 03:26 PM in Blueprint Scripting

avatar image

mblogest
45 7 9 11

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

2 answers: sort voted first

i found.why.beacuse my actor have large collision box and it select it

more ▼

answered Jan 19 '18 at 03:37 PM

avatar image

mblogest
45 7 9 11

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

Well, simple mistake: you draw your rectangle from (SelectionStart.X, SelectionStart.Y, MousePosition.X - SelectionStart.X, MousePosition.Y - SelectionStart.Y) but you ask for the actors in the selection range (SelectionStart.X, SelectionStart.Y, MousePosition.X, MousePosition.Y)

Solution: as the "Second Point" of the GetActorsInSelectionRangle node, put the results of the substraction of MousePosition - SelectionStart

[EDIT] It will be more clear with a screenshot: alt text

select.png (205.2 kB)
select.png (206.7 kB)
more ▼

answered Jan 19 '18 at 03:41 PM

avatar image

lpalbou
191 4 11 17

(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