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"

AnswerHub Maintenance

Background maintenance is scheduled to occur between 9 - 11am EDT on Tuesday, May 21. Site operation may be slower than normal during this time and a brief interruption in operation may be observed

How do i get Multisphere trace to return one object a one hit?

Alright im trying to make a simple proximity ground item inventory. Where i access through my personal inventory. IM using multisphere trace to do this. but my static gun mesh returns as more then one item. Apples are fine though.

any ideas?

Blueprint alt text

my gun mesh alt text

Inventory UI/Hit results alt text

Trace view alt text

Product Version: UE 4.18
Tags:
screen.png (438.8 kB)
screen2.png (2.0 MB)
svreen3.png (759.1 kB)
screen4.png (1.1 MB)
more ▼

asked Jan 15 '18 at 10:20 AM in Blueprint Scripting

avatar image

ArsenalStudio
1 1 1

avatar image Jin_VE Jan 15 '18 at 04:32 PM

Are you trying to make a list of what is nearby enough to pick up?

avatar image ArsenalStudio Jan 15 '18 at 11:06 PM

yes. it works for all items besides this one.

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

3 answers: sort voted first

Multisphere traces are overkill for detecting actors in a spherical range. It's basically a line trace with a radius. It's more work for the CPU and it's not the most elegant way either so I think you'd be better off doing this differently. Here's what I do for my pickups.

What you want to do is use a collision component and the OnComponentBeginOverlap/OnComponentEndOverlap events to detect when things come within a certain range. When you get the begin overlap event, check that the actor is a type you can pick up, and then put it in an array of "NearbyItems" (use AddUnique just in case so there are no duplicates). On end overlap you want to remove the actor from the list of nearby items.

Then you always have a running list of things in range.

It can be hard to use the existing collision components to get nearby items in a 2D radius. To do this, I use a box collision component for detecting the overlaps. When I go through the list of nearby items, I ignore any items further away than 1/2 the length of the box side. That way the character can pick things up in a 2D circle around himself.

more ▼

answered Jan 15 '18 at 11:59 PM

avatar image

Jin_VE
4.4k 32 77 40

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

Try trace complex if it doesnt work then maybe the problem is that it doesn't vet removed. And no matter if this or wont help you should use addunique instead of use.

more ▼

answered Jan 15 '18 at 10:56 AM

avatar image

Dark Energy
22 3 4 10

avatar image ArsenalStudio Jan 15 '18 at 11:13 PM

Dark Energy? how would i do this?

avatar image ArsenalStudio Jan 15 '18 at 11:19 PM

and for pick up add array works fine for the purpose. my issue is the ak his twice, or three times when it should only once

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

if figured out my issue. the aks skeletal mesh with hitting and the trigger was also. i re imported as a solid mesh and it works fine now

more ▼

answered Jan 16 '18 at 12:20 AM

avatar image

ArsenalStudio
1 1 1

(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